]> git.saurik.com Git - android/aapt.git/commitdiff
Merge "Fix up getAttributeFlags() function"
authorBen Gruver <bgruv@google.com>
Thu, 8 Mar 2012 00:16:18 +0000 (16:16 -0800)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Thu, 8 Mar 2012 00:16:18 +0000 (16:16 -0800)
ResourceTable.cpp

index 0c0b2ea0765f6e330d776ed05f9142308b5bab8e..df6abe85872a01219429853ff66ba0eb858042f1 100644 (file)
@@ -2304,10 +2304,8 @@ bool ResourceTable::getAttributeFlags(
 
         const char16_t* end = name + nameLen;
         const char16_t* pos = name;
-        bool failed = false;
-        while (pos < end && !failed) {
+        while (pos < end) {
             const char16_t* start = pos;
-            end++;
             while (pos < end && *pos != '|') {
                 pos++;
             }
@@ -2333,9 +2331,7 @@ bool ResourceTable::getAttributeFlags(
                 // Didn't find this flag identifier.
                 return false;
             }
-            if (pos < end) {
-                pos++;
-            }
+            pos++;
         }
 
         return true;