Revert "[Tizen] Fixed reported SVACE error in hyphenation-impl.cpp"
authorShinwoo Kim <cinoo.kim@samsung.com>
Tue, 1 Jun 2021 01:01:45 +0000 (10:01 +0900)
committerShinwoo Kim <cinoo.kim@samsung.com>
Tue, 1 Jun 2021 07:15:40 +0000 (16:15 +0900)
This reverts commit 147d49eb19170988fdcafaa62eb0c3309c612522.

dali/internal/text/text-abstraction/hyphenation-impl.cpp

index bc460ee..eef2fe9 100644 (file)
@@ -165,19 +165,17 @@ struct Hyphenation::Plugin
     }
 
     hyphens = (char*)malloc(wordLength + 5);
-    if(hyphens)
-    {
-      hnj_hyphen_hyphenate2(dict, (char*)(word), wordLength, hyphens, NULL, &rep, &pos, &cut);
 
-      hyphensList.PushBack(false);
+    hnj_hyphen_hyphenate2(dict, (char*)(word), wordLength, hyphens, NULL, &rep, &pos, &cut);
 
-      for(Length i = 0; i < wordLength - 1; i++)
-      {
-        hyphensList.PushBack((bool)(hyphens[i + 1] & 1));
-      }
+    hyphensList.PushBack(false);
 
-      free(hyphens);
+    for(Length i = 0; i < wordLength - 1; i++)
+    {
+      hyphensList.PushBack((bool)(hyphens[i + 1] & 1));
     }
+
+    free(hyphens);
 #endif
 
     return hyphensList;