Replace std::string global variables with C-style string.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / builder / builder-impl.cpp
index 9ddab28..8b69071 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -70,23 +70,22 @@ namespace
 {
 #define TOKEN_STRING(x) #x
 
-const std::string KEYNAME_ACTORS           = "actors";
-const std::string KEYNAME_ENTRY_TRANSITION = "entryTransition";
-const std::string KEYNAME_EXIT_TRANSITION  = "exitTransition";
-const std::string KEYNAME_INCLUDES         = "includes";
-const std::string KEYNAME_INHERIT          = "inherit";
-const std::string KEYNAME_MAPPINGS         = "mappings";
-const std::string KEYNAME_NAME             = "name";
-const std::string KEYNAME_SIGNALS          = "signals";
-const std::string KEYNAME_STATES           = "states";
-const std::string KEYNAME_STYLES           = "styles";
-const std::string KEYNAME_TEMPLATES        = "templates";
-const std::string KEYNAME_TRANSITIONS      = "transitions";
-const std::string KEYNAME_TYPE             = "type";
-const std::string KEYNAME_VISUALS          = "visuals";
-
-const std::string PROPERTIES            = "properties";
-const std::string ANIMATABLE_PROPERTIES = "animatableProperties";
+const char* KEYNAME_ACTORS           = "actors";
+const char* KEYNAME_ENTRY_TRANSITION = "entryTransition";
+const char* KEYNAME_EXIT_TRANSITION  = "exitTransition";
+const char* KEYNAME_INCLUDES         = "includes";
+const char* KEYNAME_INHERIT          = "inherit";
+const char* KEYNAME_MAPPINGS         = "mappings";
+const char* KEYNAME_SIGNALS          = "signals";
+const char* KEYNAME_STATES           = "states";
+const char* KEYNAME_STYLES           = "styles";
+const char* KEYNAME_TEMPLATES        = "templates";
+const char* KEYNAME_TRANSITIONS      = "transitions";
+const char* KEYNAME_TYPE             = "type";
+const char* KEYNAME_VISUALS          = "visuals";
+
+const char* PROPERTIES            = "properties";
+const char* ANIMATABLE_PROPERTIES = "animatableProperties";
 
 typedef std::vector<const TreeNode*> TreeNodeList;
 
@@ -1210,8 +1209,8 @@ void Builder::RecordStyle(StylePtr           style,
         StylePtr* stylePtr = style->subStates.Find(stateName);
         if(stylePtr)
         {
-          StylePtr style(*stylePtr);
-          RecordStyle(style, stateNode, handle, replacements);
+          StylePtr subState(*stylePtr);
+          RecordStyle(subState, stateNode, handle, replacements);
         }
         else
         {
@@ -1577,8 +1576,8 @@ bool Builder::ConvertChildValue(const TreeNode& mappingRoot, KeyStack& keyStack,
       {
         for(Property::Map::SizeType i = 0; i < map->Count(); ++i)
         {
-          Property::Value& child = map->GetValue(i);
-          ConvertChildValue(mappingRoot, keyStack, child);
+          Property::Value& currentChild = map->GetValue(i);
+          ConvertChildValue(mappingRoot, keyStack, currentChild);
         }
       }
       break;
@@ -1591,8 +1590,8 @@ bool Builder::ConvertChildValue(const TreeNode& mappingRoot, KeyStack& keyStack,
       {
         for(Property::Array::SizeType i = 0; i < array->Count(); ++i)
         {
-          Property::Value& child = array->GetElementAt(i);
-          ConvertChildValue(mappingRoot, keyStack, child);
+          Property::Value& currentChild = array->GetElementAt(i);
+          ConvertChildValue(mappingRoot, keyStack, currentChild);
         }
       }
       break;