diff options
| author | Fuwn <[email protected]> | 2022-06-24 04:38:44 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-06-24 04:38:44 -0700 |
| commit | 6841c656a0c5ead810f50405d4b3ac701380e51b (patch) | |
| tree | 249fa166cc6c04c44cbbe1bb9f338ebe79dc86ce /src/cli.cc | |
| parent | ci: push source to remote (diff) | |
| download | cait-6841c656a0c5ead810f50405d4b3ac701380e51b.tar.xz cait-6841c656a0c5ead810f50405d4b3ac701380e51b.zip | |
fix(src): apply clang-tidy fixes
Diffstat (limited to 'src/cli.cc')
| -rw-r--r-- | src/cli.cc | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -51,18 +51,18 @@ cli::cli(int argc, char **argv) : _argc(argc), _argv(argv) { auto cli::arg(int i) -> std::optional<std::string> { if (i < this->_argc) { return std::string(this->_argv[i]); - } else { - return std::nullopt; } + + return std::nullopt; } auto cli::option(const std::string &key) -> std::optional<std::optional<std::string>> { if (this->options.contains(key)) { return this->options[key]; - } else { - return std::nullopt; } + + return std::nullopt; } auto cli::look() -> int { @@ -100,7 +100,7 @@ auto cli::look() -> int { std::cout << "\n\n"; } - for (auto &token_line : parser.nodes()) { + for (const auto &token_line : parser.nodes()) { std::visit( [](const auto &node) -> void { std::cout << node.string() << '\n'; |