Skip to content

Commit

Permalink
clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-c committed Jan 21, 2021
1 parent 716471e commit 5cdcd96
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions include/Common/Daemon.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ class Daemon
protected:
SimpleLog log; // object for output logging.
ConfigFile config; // input configuration file, if any. Loaded if path provided on command line.

struct ConfigOption {
std::string key;
std::string value;
};
std::vector<ConfigOption> execOptions; // options extracted from command line arguments (-o key=value)

std::vector<ConfigOption> execOptions; // options extracted from command line arguments (-o key=value)

// check daemon status (e.g. after constructor, before starting main loop by calling run(), to know if init success)
bool isOk();

Expand Down
20 changes: 10 additions & 10 deletions src/Daemon.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -127,18 +127,18 @@ Daemon::Daemon(int argc, char* argv[], DaemonConfigParameters* dConfigParams, st
} else if (key == "logRotateNow") {
params.logRotateNow = std::stoi(value);
} else {
bool keyOk = 0;
for (auto const& k : extraCommandLineOptions) {
if (k == key) {
keyOk = 1;
execOptions.push_back({key, value});
break;
}
}
if (!keyOk) {
bool keyOk = 0;
for (auto const& k : extraCommandLineOptions) {
if (k == key) {
keyOk = 1;
execOptions.push_back({ key, value });
break;
}
}
if (!keyOk) {
log.error("Unkown option key %s in option %s", key.c_str(), optarg);
throw __LINE__;
}
}
}
} break;

Expand Down

0 comments on commit 5cdcd96

Please sign in to comment.