MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / applyOptionsFile

Method applyOptionsFile

lib/config/config.cc:454–475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

452}
453
454void Config::applyOptionsFile(const std::string& data)
455{
456 if (!data.empty())
457 {
458 for (auto setting : split(data, '\n'))
459 {
460 setting = trimWhitespace(setting);
461 if (setting.size() == 0)
462 continue;
463 if (setting[0] == '#')
464 continue;
465
466 auto equals = setting.find('=');
467 if (equals == std::string::npos)
468 error("Malformed setting line '{}'", setting);
469
470 auto key = setting.substr(0, equals);
471 auto value = setting.substr(equals + 1);
472 globalConfig().set(key, value);
473 }
474 }
475}
476
477void Config::applyDefaultOptions()
478{

Callers 1

wtRebuildConfigurationFunction · 0.80

Calls 7

trimWhitespaceFunction · 0.85
errorFunction · 0.85
splitFunction · 0.50
emptyMethod · 0.45
sizeMethod · 0.45
findMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected