]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Simplify is_address_of_possible
authorJürg Billeter <j@bitron.ch>
Sun, 25 Jul 2010 19:21:01 +0000 (21:21 +0200)
committerJürg Billeter <j@bitron.ch>
Tue, 27 Jul 2010 13:47:04 +0000 (15:47 +0200)
codegen/valaccodebasemodule.vala

index 56e9911501e4c66519c5dbf942442725d900fd4d..50127b638a7ff67fbe95abb56226710c5d34433e 100644 (file)
@@ -5384,19 +5384,8 @@ public class Vala.CCodeBaseModule : CCodeModule {
                if (ma == null) {
                        return false;
                }
-               if (ma.symbol_reference == null) {
-                       return false;
-               }
-               if (ma.symbol_reference is FormalParameter) {
-                       return true;
-               }
-               if (ma.symbol_reference is LocalVariable) {
-                       return true;
-               }
-               if (ma.symbol_reference is Field) {
-                       return true;
-               }
-               return false;
+
+               return (ma.symbol_reference is Variable);
        }
 
        /* retrieve the correct address_of expression for a give expression, creates temporary variables