Skip to content

Commit

Permalink
Remove un-used code in config
Browse files Browse the repository at this point in the history
  • Loading branch information
chill117 committed May 22, 2023
1 parent 9f3f5f8 commit 8e43871
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace {

typedef std::pair<const std::string, const std::string> KeyValuePair;

const std::map<const char*, const char*> defaultValues = {
{ "apiKey.id", "" },
{ "apiKey.key", "" },
Expand Down Expand Up @@ -113,23 +111,6 @@ namespace {
}
return true;
}

KeyValuePair readFromConfigLine(const std::string &line) {
// The character used to separate key/value pair - e.g "key=value".
const std::string delimiter = "=";
const auto pos = line.find(delimiter);
if (pos != std::string::npos) {
// Found delimiter.
const std::string key = line.substr(0, pos);
if (isConfigKey(key.c_str())) {
const std::string value = line.substr(pos + 1);
return std::make_pair(key, value);
} else {
logger::write("Unknown key found in configuration file: \"" + std::string(key) + "\"");
}
}
return std::make_pair("", "");
}
}

namespace config {
Expand Down

0 comments on commit 8e43871

Please sign in to comment.