You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to understand why we're forcing the args lowercase here -
void SettingsManager::parseCommandLineArgs(const std::vector<std::string>& args) {
for (auto arg : args) {
int splitIndex = (int)arg.find_first_of("=");
if (splitIndex != std::string::npos) {
**std::transform(arg.begin(), arg.end(), arg.begin(), ::tolower);**
std::string key = arg.substr(0, splitIndex);
std::string value = arg.substr(splitIndex + 1, arg.size() - splitIndex - 1);
auto callbackListIt = mCommandLineArgsHandlers.find(key);
if (callbackListIt == mCommandLineArgsHandlers.end())
continue;
for (auto callback : callbackListIt->second) {
callback(value);
}
}
}
}
Got tripped up on creating my own arg, debugHasAttract=false. When I added to parser I forgot to lowercase it, so this won't find a match SettingsManager::getInstance()->addCommandLineParser("debugHasAttract", [.....
but this will SettingsManager::getInstance()->addCommandLineParser("debughasattract", [.....
As I'm looking at it a reason isn't jumping out at me, just curious
The text was updated successfully, but these errors were encountered:
Trying to understand why we're forcing the args lowercase here -
Got tripped up on creating my own arg,
debugHasAttract=false
. When I added to parser I forgot to lowercase it, so this won't find a matchSettingsManager::getInstance()->addCommandLineParser("debugHasAttract", [.....
but this will
SettingsManager::getInstance()->addCommandLineParser("debughasattract", [.....
As I'm looking at it a reason isn't jumping out at me, just curious
The text was updated successfully, but these errors were encountered: