projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Optimize some text-typesetter rendering operations" into devel/master
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
builder
/
dictionary.h
diff --git
a/dali-toolkit/internal/builder/dictionary.h
b/dali-toolkit/internal/builder/dictionary.h
index
a3036d9
..
b570c04
100644
(file)
--- a/
dali-toolkit/internal/builder/dictionary.h
+++ b/
dali-toolkit/internal/builder/dictionary.h
@@
-2,7
+2,7
@@
#define DALI_TOOLKIT_INTERNAL_BUILDER_DICTIONARY_H
/*
#define DALI_TOOLKIT_INTERNAL_BUILDER_DICTIONARY_H
/*
- * Copyright (c) 202
0
Samsung Electronics Co., Ltd.
+ * Copyright (c) 202
1
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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-30,7
+30,6
@@
namespace Toolkit
{
namespace Internal
{
{
namespace Internal
{
-
/**
* The Dictionary template class enables a means of storing key-value
* pairs where the keys are strings and the value can be a complex
/**
* The Dictionary template class enables a means of storing key-value
* pairs where the keys are strings and the value can be a complex
@@
-41,7
+40,7
@@
namespace Internal
using DictionaryKeys = std::vector<std::string>;
using DictionaryKeys = std::vector<std::string>;
-inline void Merge(
DictionaryKeys& toDict, const DictionaryKeys& fromDict
)
+inline void Merge(
DictionaryKeys& toDict, const DictionaryKeys& fromDict
)
{
for(const auto& element : fromDict)
{
{
for(const auto& element : fromDict)
{
@@
-53,7
+52,6
@@
inline void Merge( DictionaryKeys& toDict, const DictionaryKeys& fromDict )
}
}
}
}
-
template<typename EntryType>
class Dictionary
{
template<typename EntryType>
class Dictionary
{
@@
-64,7
+62,7
@@
private:
struct Element
{
std::string key;
struct Element
{
std::string key;
- EntryType entry;
+ EntryType
entry;
Element(std::string name, EntryType entry)
: key(std::move(name)),
entry(std::move(entry))
Element(std::string name, EntryType entry)
: key(std::move(name)),
entry(std::move(entry))
@@
-82,9
+80,9
@@
private:
auto FindElement(std::string_view key)
{
auto FindElement(std::string_view key)
{
- return std::find_if(container.begin(), container.end(), [key](auto& e){
-
return bool(key == e.key);
-
});
+ return std::find_if(container.begin(), container.end(), [key](auto& e)
{
+ return bool(key == e.key);
+ });
}
public:
}
public:
@@
-138,12
+136,12
@@
public:
if(iter != End())
{
if(iter != End())
{
- container.erase(
iter
);
+ container.erase(
iter
);
}
}
}
}
}
}
- void Merge(
const Dictionary<EntryType>& dictionary
)
+ void Merge(
const Dictionary<EntryType>& dictionary
)
{
for(const auto& element : dictionary.container)
{
{
for(const auto& element : dictionary.container)
{
@@
-166,7
+164,7
@@
public:
*/
const EntryType* FindConst(std::string_view key) const
{
*/
const EntryType* FindConst(std::string_view key) const
{
- if(
! key.empty()
)
+ if(
!key.empty()
)
{
auto iter = FindElementCaseInsensitive(key);
{
auto iter = FindElementCaseInsensitive(key);
@@
-184,7
+182,7
@@
public:
*/
EntryType* Find(std::string_view key) const
{
*/
EntryType* Find(std::string_view key) const
{
- if(
! key.empty()
)
+ if(
!key.empty()
)
{
auto iter = FindElementCaseInsensitive(key);
{
auto iter = FindElementCaseInsensitive(key);
@@
-209,7
+207,7
@@
public:
return container.cend();
}
return container.cend();
}
- void GetKeys(
DictionaryKeys& keys
) const
+ void GetKeys(
DictionaryKeys& keys
) const
{
keys.clear();
for(const auto& element : container)
{
keys.clear();
for(const auto& element : container)
@@
-224,10
+222,8
@@
public:
}
};
}
};
-
-
-}//Internal
-}//Toolkit
-}//Dali
+} // namespace Internal
+} // namespace Toolkit
+} // namespace Dali
#endif // DALI_TOOLKIT_INTERNAL_BUILDER_DICTIONARY_H
#endif // DALI_TOOLKIT_INTERNAL_BUILDER_DICTIONARY_H