Skip to content
Snippets Groups Projects
Commit 25ac06cb authored by Franck Dary's avatar Franck Dary
Browse files

Dict now has emptyValue member

parent 7e465832
No related branches found
No related tags found
No related merge requests found
......@@ -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 :
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment