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

Rempalced litteral id by constexpr

parent 3ee8137b
No related branches found
No related tags found
No related merge requests found
...@@ -135,8 +135,8 @@ void Config::printForDebug(FILE * dest) const ...@@ -135,8 +135,8 @@ void Config::printForDebug(FILE * dest) const
std::string stackStr = ""; std::string stackStr = "";
for (auto & s : stack) for (auto & s : stack)
{ {
if (hasColIndex("ID")) if (hasColIndex(idColName))
stackStr += getLastNotEmptyConst("ID", s); stackStr += getLastNotEmptyConst(idColName, s);
else else
stackStr += std::to_string(s); stackStr += std::to_string(s);
stackStr += ","; stackStr += ",";
...@@ -285,12 +285,12 @@ bool Config::isComment(std::size_t lineIndex) const ...@@ -285,12 +285,12 @@ bool Config::isComment(std::size_t lineIndex) const
bool Config::isMultiword(std::size_t lineIndex) const bool Config::isMultiword(std::size_t lineIndex) const
{ {
return hasColIndex("ID") && getConst("ID", lineIndex, 0).get().find('-') != std::string::npos; return hasColIndex(idColName) && getConst(idColName, lineIndex, 0).get().find('-') != std::string::npos;
} }
bool Config::isEmptyNode(std::size_t lineIndex) const bool Config::isEmptyNode(std::size_t lineIndex) const
{ {
return hasColIndex("ID") && getConst("ID", lineIndex, 0).get().find('.') != std::string::npos; return hasColIndex(idColName) && getConst(idColName, lineIndex, 0).get().find('.') != std::string::npos;
} }
bool Config::isToken(std::size_t lineIndex) const bool Config::isToken(std::size_t lineIndex) const
......
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