[glibmm/gmmproc-refactor] Fix empty "this" parameter for static methods.



commit 0b1ea51bdde4346d3280447f374079d7de15c392
Author: Krzesimir Nowak <qdlacz gmail com>
Date:   Thu Jul 12 18:13:16 2012 +0200

    Fix empty "this" parameter for static methods.

 tools/pm/Common/Output/Method.pm |   23 +++++++++++++----------
 1 files changed, 13 insertions(+), 10 deletions(-)
---
diff --git a/tools/pm/Common/Output/Method.pm b/tools/pm/Common/Output/Method.pm
index 6d23a3f..e6ab06a 100644
--- a/tools/pm/Common/Output/Method.pm
+++ b/tools/pm/Common/Output/Method.pm
@@ -124,19 +124,22 @@ sub _output_cc ($$$$$$$$$$$$$$$$$)
     my $this_param = '';
     my @params = ();
 
-    if ($const)
+    unless ($static)
     {
-      $this_param = 'const_cast< ' . $c_type . '* >(gobj())';
-    }
-    elsif (not $static)
-    {
-      $this_param = 'gobj()';
-    }
+      if ($const)
+      {
+        $this_param = 'const_cast< ' . $c_type . '* >(gobj())';
+      }
+      else
+      {
+        $this_param = 'gobj()';
+      }
 
-    push @params, $this_param;
+      push @params, $this_param;
+    }
 
-    my $prepped_cxx_param_types = [];
-    my $prepped_cxx_param_names = [];
+    my $prepped_cxx_param_types = undef;
+    my $prepped_cxx_param_names = undef;
 
     if ($cxx_param_out_index < 0)
     {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]