X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Fproperty-string-parser.cpp;h=ec0fc946fb8c3174a5c2e63f1ecdabe5cff78bc1;hp=2aa05e9018d863dc983919e98c092b3dba22fc03;hb=00758f1301dd0bfbf6dc87659a6db9d0ba2c6816;hpb=07bdc775bf08ac2f53c8f6a3a8856077a299959b diff --git a/dali-toolkit/internal/text/property-string-parser.cpp b/dali-toolkit/internal/text/property-string-parser.cpp index 2aa05e9..ec0fc94 100644 --- a/dali-toolkit/internal/text/property-string-parser.cpp +++ b/dali-toolkit/internal/text/property-string-parser.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 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. @@ -28,16 +28,13 @@ namespace Dali { - namespace Toolkit { - namespace Text { - -void CreatePropertyMap( const TreeNode* const node, Property::Map& map ) +void CreatePropertyMap(const TreeNode* const node, Property::Map& map) { - switch( node->GetType() ) + switch(node->GetType()) { case TreeNode::IS_NULL: case TreeNode::OBJECT: @@ -47,7 +44,7 @@ void CreatePropertyMap( const TreeNode* const node, Property::Map& map ) } case TreeNode::STRING: { - map.Insert( node->GetName(), Property::Value( node->GetString() ) ); + map.Insert(node->GetName(), Property::Value(node->GetString())); break; } case TreeNode::INTEGER: @@ -58,23 +55,23 @@ void CreatePropertyMap( const TreeNode* const node, Property::Map& map ) } } - for( TreeNode::ConstIterator it = node->CBegin(), endIt = node->CEnd(); it != endIt; ++it ) + for(TreeNode::ConstIterator it = node->CBegin(), endIt = node->CEnd(); it != endIt; ++it) { const TreeNode::KeyNodePair& pair = *it; - CreatePropertyMap( &pair.second, map ); + CreatePropertyMap(&pair.second, map); } } -void ParsePropertyString( const std::string& property, Property::Map& map ) +void ParsePropertyString(const std::string& property, Property::Map& map) { Toolkit::JsonParser parser = Toolkit::JsonParser::New(); - if( parser.Parse( property ) ) + if(parser.Parse(property)) { const TreeNode* const node = parser.GetRoot(); - if( node ) + if(node) { - CreatePropertyMap( node, map ); + CreatePropertyMap(node, map); } } }