]> git.saurik.com Git - cycript.git/commitdiff
Simplified CYDeclarations::Replace, which should really be rehauled anyway.
authorJay Freeman (saurik) <saurik@saurik.com>
Mon, 12 Jul 2010 01:41:45 +0000 (01:41 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 12 Jul 2010 01:41:45 +0000 (01:41 +0000)
Replace.cpp

index b804ce3cdef4f2a57e2d6b7c4abb56881523aaec..8023bdb112bb9c784f891bc58c2cf1b5b8e2b7f5 100644 (file)
@@ -213,15 +213,7 @@ CYProperty *CYDeclarations::Property(CYContext &context) { $T(NULL)
 }
 
 CYCompound *CYDeclarations::Replace(CYContext &context) {
-    CYCompound *compound;
-    if (next_ == NULL) compound:
-        compound = $ CYCompound();
-    else {
-        compound = next_->Replace(context);
-        if (compound == NULL)
-            goto compound;
-    }
-
+    CYCompound *compound(next_ == NULL ? $ CYCompound() : next_->Replace(context));
     if (CYAssignment *assignment = declaration_->Assignment(context))
         compound->AddPrev(assignment);
     return compound;