Commit 5d07c46efe923be9084ee56d314c1de0917454e2

Authored by Henry Schreiner
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"'
include/CLI/App.hpp
@@ -1180,7 +1180,7 @@ class App { @@ -1180,7 +1180,7 @@ class App {
1180 1180
1181 /// Check to see if this subcommand was parsed, true only if received on command line. 1181 /// Check to see if this subcommand was parsed, true only if received on command line.
1182 /// This allows the subcommand to be directly checked. 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 /// @name Extras for subclassing 1186 /// @name Extras for subclassing
include/CLI/Validators.hpp
@@ -671,7 +671,7 @@ class IsMember : public Validator { @@ -671,7 +671,7 @@ class IsMember : public Validator {
671 671
672 /// This allows in-place construction using an initializer list 672 /// This allows in-place construction using an initializer list
673 template <typename T, typename... Args> 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 : IsMember(std::vector<T>(values), std::forward<Args>(args)...) {} 675 : IsMember(std::vector<T>(values), std::forward<Args>(args)...) {}
676 676
677 /// This checks to see if an item is in a set (empty function) 677 /// This checks to see if an item is in a set (empty function)
@@ -742,7 +742,7 @@ class Transformer : public Validator { @@ -742,7 +742,7 @@ class Transformer : public Validator {
742 742
743 /// This allows in-place construction 743 /// This allows in-place construction
744 template <typename... Args> 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 : Transformer(TransformPairs<std::string>(values), std::forward<Args>(args)...) {} 746 : Transformer(TransformPairs<std::string>(values), std::forward<Args>(args)...) {}
747 747
748 /// direct map of std::string to std::string 748 /// direct map of std::string to std::string
@@ -800,7 +800,7 @@ class CheckedTransformer : public Validator { @@ -800,7 +800,7 @@ class CheckedTransformer : public Validator {
800 800
801 /// This allows in-place construction 801 /// This allows in-place construction
802 template <typename... Args> 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 : CheckedTransformer(TransformPairs<std::string>(values), std::forward<Args>(args)...) {} 804 : CheckedTransformer(TransformPairs<std::string>(values), std::forward<Args>(args)...) {}
805 805
806 /// direct map of std::string to std::string 806 /// direct map of std::string to std::string