Commit 5d07c46efe923be9084ee56d314c1de0917454e2
Committed by
Henry Schreiner
1 parent
4bfcc0e9
Adding google-explicit-constructor fixes
Used '-DCLI11_CLANG_TIDY=ON -DCLI11_CLANG_TIDY_OPTIONS=-fix;-checks=google-explicit-constructor"'
Showing
2 changed files
with
4 additions
and
4 deletions
include/CLI/App.hpp
| ... | ... | @@ -1180,7 +1180,7 @@ class App { |
| 1180 | 1180 | |
| 1181 | 1181 | /// Check to see if this subcommand was parsed, true only if received on command line. |
| 1182 | 1182 | /// This allows the subcommand to be directly checked. |
| 1183 | - operator bool() const { return parsed_ > 0; } | |
| 1183 | + explicit operator bool() const { return parsed_ > 0; } | |
| 1184 | 1184 | |
| 1185 | 1185 | ///@} |
| 1186 | 1186 | /// @name Extras for subclassing | ... | ... |
include/CLI/Validators.hpp
| ... | ... | @@ -671,7 +671,7 @@ class IsMember : public Validator { |
| 671 | 671 | |
| 672 | 672 | /// This allows in-place construction using an initializer list |
| 673 | 673 | template <typename T, typename... Args> |
| 674 | - explicit IsMember(std::initializer_list<T> values, Args &&... args) | |
| 674 | + IsMember(std::initializer_list<T> values, Args &&... args) | |
| 675 | 675 | : IsMember(std::vector<T>(values), std::forward<Args>(args)...) {} |
| 676 | 676 | |
| 677 | 677 | /// This checks to see if an item is in a set (empty function) |
| ... | ... | @@ -742,7 +742,7 @@ class Transformer : public Validator { |
| 742 | 742 | |
| 743 | 743 | /// This allows in-place construction |
| 744 | 744 | template <typename... Args> |
| 745 | - explicit Transformer(std::initializer_list<std::pair<std::string, std::string>> values, Args &&... args) | |
| 745 | + Transformer(std::initializer_list<std::pair<std::string, std::string>> values, Args &&... args) | |
| 746 | 746 | : Transformer(TransformPairs<std::string>(values), std::forward<Args>(args)...) {} |
| 747 | 747 | |
| 748 | 748 | /// direct map of std::string to std::string |
| ... | ... | @@ -800,7 +800,7 @@ class CheckedTransformer : public Validator { |
| 800 | 800 | |
| 801 | 801 | /// This allows in-place construction |
| 802 | 802 | template <typename... Args> |
| 803 | - explicit CheckedTransformer(std::initializer_list<std::pair<std::string, std::string>> values, Args &&... args) | |
| 803 | + CheckedTransformer(std::initializer_list<std::pair<std::string, std::string>> values, Args &&... args) | |
| 804 | 804 | : CheckedTransformer(TransformPairs<std::string>(values), std::forward<Args>(args)...) {} |
| 805 | 805 | |
| 806 | 806 | /// direct map of std::string to std::string | ... | ... |