Fixed clang-tidy warnings
This commit is contained in:
@@ -56,7 +56,7 @@ void cli_handler::setup_logging()
|
||||
}
|
||||
}
|
||||
|
||||
cli_flow_t cli_handler::parse(int argc, const char *argv[])
|
||||
cli_flow_t cli_handler::parse(int argc, const char **argv)
|
||||
{
|
||||
app.add_option("-c,--config", config_path,
|
||||
"Location of configuration file, when '-' read from stdin");
|
||||
@@ -104,7 +104,7 @@ cli_flow_t cli_handler::parse(int argc, const char *argv[])
|
||||
return cli_flow_t::kExit;
|
||||
}
|
||||
catch (const CLI::ParseError &e) {
|
||||
exit(app.exit(e));
|
||||
exit(app.exit(e)); // NOLINT(concurrency-mt-unsafe)
|
||||
}
|
||||
|
||||
if (quiet || dump_config)
|
||||
@@ -115,7 +115,7 @@ cli_flow_t cli_handler::parse(int argc, const char *argv[])
|
||||
return cli_flow_t::kContinue;
|
||||
}
|
||||
|
||||
cli_flow_t cli_handler::handle_options(int argc, const char *argv[])
|
||||
cli_flow_t cli_handler::handle_options(int argc, const char **argv)
|
||||
{
|
||||
auto res = parse(argc, argv);
|
||||
|
||||
@@ -558,4 +558,4 @@ cli_flow_t cli_handler::print_config()
|
||||
|
||||
return cli_flow_t::kExit;
|
||||
}
|
||||
} // namespace clanguml::options
|
||||
} // namespace clanguml::cli
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
* @param argv
|
||||
* @return
|
||||
*/
|
||||
cli_flow_t handle_options(int argc, const char *argv[]);
|
||||
cli_flow_t handle_options(int argc, const char **argv);
|
||||
|
||||
/**
|
||||
* Print the program version and basic information
|
||||
@@ -135,7 +135,7 @@ public:
|
||||
clanguml::config::config config;
|
||||
|
||||
private:
|
||||
cli_flow_t parse(int argc, const char *argv[]);
|
||||
cli_flow_t parse(int argc, const char **argv);
|
||||
|
||||
cli_flow_t handle_pre_config_options();
|
||||
|
||||
@@ -149,5 +149,4 @@ private:
|
||||
std::shared_ptr<spdlog::logger> logger_;
|
||||
CLI::App app{"Clang-based UML diagram generator for C++"};
|
||||
};
|
||||
|
||||
} // namespace clanguml::options
|
||||
} // namespace clanguml::cli
|
||||
@@ -140,14 +140,14 @@ diagram_t from_string(const std::string &s)
|
||||
{
|
||||
if (s == "class")
|
||||
return diagram_t::kClass;
|
||||
else if (s == "sequence")
|
||||
if (s == "sequence")
|
||||
return diagram_t::kSequence;
|
||||
else if (s == "include")
|
||||
if (s == "include")
|
||||
return diagram_t::kInclude;
|
||||
else if (s == "package")
|
||||
if (s == "package")
|
||||
return diagram_t::kPackage;
|
||||
else
|
||||
throw std::runtime_error{"Invalid diagram type: " + s};
|
||||
|
||||
throw std::runtime_error{"Invalid diagram type: " + s};
|
||||
}
|
||||
|
||||
} // namespace clanguml::common::model
|
||||
|
||||
@@ -52,7 +52,7 @@ struct plantuml {
|
||||
|
||||
struct diagram_template {
|
||||
std::string description;
|
||||
common::model::diagram_t type;
|
||||
common::model::diagram_t type{common::model::diagram_t::kClass};
|
||||
std::string jinja_template;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user