diff --git a/common/include/Dict.hpp b/common/include/Dict.hpp index 2aef8884592237a46dd8f745b69809de03eb6cc6..a5ae77242df2e34c15c48bb0706ead4396336829 100644 --- a/common/include/Dict.hpp +++ b/common/include/Dict.hpp @@ -16,6 +16,7 @@ class Dict static constexpr char const * unknownValueStr = "__unknownValue__"; static constexpr char const * nullValueStr = "__nullValue__"; + static constexpr char const * emptyValueStr = "__emptyValue__"; static constexpr std::size_t maxEntrySize = 5000; private : diff --git a/common/src/Dict.cpp b/common/src/Dict.cpp index 8199f8383e27062d18f40af6e40eeff41ac2563e..6154dc1e64beca1e8fb7ff40a0b4bf896887fcb0 100644 --- a/common/src/Dict.cpp +++ b/common/src/Dict.cpp @@ -6,6 +6,7 @@ Dict::Dict(State state) setState(state); insert(unknownValueStr); insert(nullValueStr); + insert(emptyValueStr); } Dict::Dict(const char * filename, State state) @@ -70,7 +71,7 @@ void Dict::insert(const std::string & element) int Dict::getIndexOrInsert(const std::string & element) { if (element.empty()) - return getIndexOrInsert(nullValueStr); + return getIndexOrInsert(emptyValueStr); const auto & found = elementsToIndexes.find(element);