We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent faa0725 commit 14eefb7Copy full SHA for 14eefb7
app/parse_v2.cpp
@@ -1,7 +1,6 @@
1
//-*-C++-*-
2
3
#include "v2.h"
4
-#include <optional>
5
6
void set_loglevel(std::string level)
7
{
@@ -159,15 +158,11 @@ int main(int argc, char* argv[]) {
159
158
LOG_F(INFO, "No output file found, defaulting to %s", ofile.c_str());
160
}
161
162
- if (result.count("password")) {
163
- password = result["password"].as<std::string>();
164
- } else {
165
- password = std::nullopt;
166
- }
167
-
168
auto config = create_config(ifile, ofile, page);
169
LOG_S(INFO) << "config: \n" << config.dump(2);
170
- config["password"] = password;
+ if (result.count("password")) {
+ config["password"] = result["password"].as<std::string>();
+ }
171
172
utils::timer timer;
173
0 commit comments