diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2024-12-11 19:15:18 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2024-12-11 21:48:37 +0100 |
commit | e166206702c8dbd3162452cf26f368e856ac0138 (patch) | |
tree | e4e659fc91b0a47f04755b6298b8085370aefc8d /src/ctor.h | |
parent | 936fb83eec4038a48e6e42f9f5d93677dc216ab4 (diff) |
More clang-tidy fixes and increase warning level (and fix them)
Diffstat (limited to 'src/ctor.h')
-rw-r--r-- | src/ctor.h | 34 |
1 files changed, 17 insertions, 17 deletions
@@ -63,20 +63,20 @@ enum class toolchain struct source { - constexpr source(const char* file) : file(file) {} // convenience ctor + source(const char* file_) : file(file_) {} // convenience ctor - constexpr source(std::string_view file) : source(file, ctor::language::automatic) {} - constexpr source(std::string_view file, ctor::language lang) : file(file), language(lang) {} + source(std::string_view file_) : source(file_, ctor::language::automatic) {} + source(std::string_view file_, ctor::language lang_) : file(file_), language(lang_) {} - constexpr source(std::string_view file, std::string_view output) : file(file), output(output) {} - constexpr source(std::string_view file, ctor::language lang, std::string_view output) : file(file), language(lang), output(output) {} + source(std::string_view file_, std::string_view output_) : file(file_), output(output_) {} + source(std::string_view file_, ctor::language lang_, std::string_view output_) : file(file_), language(lang_), output(output_) {} - constexpr source(ctor::toolchain toolchain, std::string_view file) : file(file), toolchain(toolchain) {} - constexpr source(ctor::toolchain toolchain, std::string_view file, ctor::language lang) : file(file), toolchain(toolchain), language(lang) {} + source(ctor::toolchain toolchain_, std::string_view file_) : file(file_), toolchain(toolchain_) {} + source(ctor::toolchain toolchain_, std::string_view file_, ctor::language lang_) : file(file_), toolchain(toolchain_), language(lang_) {} - constexpr source(ctor::toolchain toolchain, std::string_view file, std::string_view output) : file(file), toolchain(toolchain), output(output) {} + source(ctor::toolchain toolchain_, std::string_view file_, std::string_view output_) : file(file_), toolchain(toolchain_), output(output_) {} - constexpr source(ctor::toolchain toolchain, std::string_view file, ctor::language lang, std::string_view output) : file(file), toolchain(toolchain), language(lang), output(output) {} + source(ctor::toolchain toolchain_, std::string_view file_, ctor::language lang_, std::string_view output_) : file(file_), toolchain(toolchain_), language(lang_), output(output_) {} std::string file; ctor::toolchain toolchain{ctor::toolchain::any}; @@ -156,17 +156,17 @@ template<typename T> class flag { public: - flag(const std::string& str); + flag(std::string_view str); flag(const char* str); - flag(T opt) : opt(opt) {} - flag(T opt, const std::string& arg) : opt(opt), arg(arg) {} - flag(T opt, const char* arg) : opt(opt), arg(arg) {} - flag(ctor::toolchain toolchain, T opt) : toolchain(toolchain), opt(opt) {} - flag(ctor::toolchain toolchain, T opt, const char* arg) : toolchain(toolchain), opt(opt), arg(arg) {} - flag(ctor::toolchain toolchain, T opt, const std::string& arg) : toolchain(toolchain), opt(opt), arg(arg) {} + flag(T opt_) : opt(opt_) {} + flag(T opt_, std::string_view arg_) : opt(opt_), arg(arg_) {} + flag(T opt_, const char* arg_) : opt(opt_), arg(arg_) {} + flag(ctor::toolchain toolchain_, T opt_) : toolchain(toolchain_), opt(opt_) {} + flag(ctor::toolchain toolchain_, T opt_, const char* arg_) : toolchain(toolchain_), opt(opt_), arg(arg_) {} + flag(ctor::toolchain toolchain_, T opt_, std::string_view arg_) : toolchain(toolchain_), opt(opt_), arg(arg_) {} ctor::toolchain toolchain{ctor::toolchain::any}; - T opt; + T opt{}; std::string arg; }; |