diff options
Diffstat (limited to 'BuildTools/EmojisGenerator/EmojiMapper.cpp')
-rw-r--r-- | BuildTools/EmojisGenerator/EmojiMapper.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/BuildTools/EmojisGenerator/EmojiMapper.cpp b/BuildTools/EmojisGenerator/EmojiMapper.cpp index b93a191..097ddcc 100644 --- a/BuildTools/EmojisGenerator/EmojiMapper.cpp +++ b/BuildTools/EmojisGenerator/EmojiMapper.cpp @@ -6,6 +6,7 @@ #include <SwifTools/EmojiMapper.h> +#include <algorithm> #include <string> #include <unordered_map> @@ -15,9 +16,21 @@ namespace Swift { <%= mapping %> std::vector<std::string> EmojiMapper::getCategories() { - std::vector<std::string> categories; + std::vector<std::string> categories = { + "people", + "nature", + "food", + "activity", + "travel", + "objects", + "symbols", + "flags" + }; + for (const auto& keyValuePair : emojisInCategory) { - categories.push_back(keyValuePair.first); + if (std::find(std::begin(categories), std::end(categories), keyValuePair.first) == std::end(categories)) { + categories.push_back(keyValuePair.first); + } } return categories; } |