tvgSvgLoader: Fix wrong bracket
authorJunsuChoi <jsuya.choi@samsung.com>
Tue, 13 Oct 2020 01:00:03 +0000 (10:00 +0900)
committerHermet Park <chuneon.park@samsung.com>
Tue, 13 Oct 2020 04:54:53 +0000 (13:54 +0900)
Change-Id: I4ae7242816febbddf7b6d1cd05fffe3b8abc0fa6

src/loaders/svg/tvgSvgLoader.cpp
src/loaders/svg/tvgSvgSceneBuilder.cpp

index 6466621..8e52b44 100644 (file)
@@ -1445,7 +1445,7 @@ static SvgNode* _findChildById(SvgNode* node, const char* id)
 static SvgNode* _findNodeById(SvgNode *node, string* id)
 {
     SvgNode* result = nullptr;
-    if ((node->id != nullptr) && !node->id->compare(*id)) return node;
+    if (node->id && !node->id->compare(*id)) return node;
 
     if (node->child.cnt > 0) {
         auto child = node->child.list;
index 6c20164..5ba194e 100644 (file)
@@ -359,10 +359,10 @@ unique_ptr<Scene> _sceneBuildHelper(SvgNode* node, float vx, float vy, float vw,
                     (*child)->style->opacity = ((*child)->style->opacity * node->style->opacity) / 255.0f;
                     scene->push(_shapeBuildHelper(*child, vx, vy, vw, vh));
                 }
-
+            }
             //Apply composite node
             if (node->style->comp.node) {
-                 //Composite ClipPath
+                //Composite ClipPath
                 if (((int)node->style->comp.flags & (int)SvgCompositeFlags::ClipPath)) {
                     auto compNode = node->style->comp.node;
                     if (compNode->child.cnt > 0) {
@@ -373,7 +373,6 @@ unique_ptr<Scene> _sceneBuildHelper(SvgNode* node, float vx, float vy, float vw,
                     }
                 }
             }
-            }
         }
         return scene;
     }