mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-04-29 20:23:55 +00:00
Adding google-explicit-constructor fixes
Used '-DCLI11_CLANG_TIDY=ON -DCLI11_CLANG_TIDY_OPTIONS=-fix;-checks=google-explicit-constructor"'
This commit is contained in:
parent
4bfcc0e9c7
commit
5d07c46efe
@ -1180,7 +1180,7 @@ class App {
|
||||
|
||||
/// Check to see if this subcommand was parsed, true only if received on command line.
|
||||
/// This allows the subcommand to be directly checked.
|
||||
operator bool() const { return parsed_ > 0; }
|
||||
explicit operator bool() const { return parsed_ > 0; }
|
||||
|
||||
///@}
|
||||
/// @name Extras for subclassing
|
||||
|
@ -671,7 +671,7 @@ class IsMember : public Validator {
|
||||
|
||||
/// This allows in-place construction using an initializer list
|
||||
template <typename T, typename... Args>
|
||||
explicit IsMember(std::initializer_list<T> values, Args &&... args)
|
||||
IsMember(std::initializer_list<T> values, Args &&... args)
|
||||
: IsMember(std::vector<T>(values), std::forward<Args>(args)...) {}
|
||||
|
||||
/// This checks to see if an item is in a set (empty function)
|
||||
@ -742,7 +742,7 @@ class Transformer : public Validator {
|
||||
|
||||
/// This allows in-place construction
|
||||
template <typename... Args>
|
||||
explicit Transformer(std::initializer_list<std::pair<std::string, std::string>> values, Args &&... args)
|
||||
Transformer(std::initializer_list<std::pair<std::string, std::string>> values, Args &&... args)
|
||||
: Transformer(TransformPairs<std::string>(values), std::forward<Args>(args)...) {}
|
||||
|
||||
/// direct map of std::string to std::string
|
||||
@ -800,7 +800,7 @@ class CheckedTransformer : public Validator {
|
||||
|
||||
/// This allows in-place construction
|
||||
template <typename... Args>
|
||||
explicit CheckedTransformer(std::initializer_list<std::pair<std::string, std::string>> values, Args &&... args)
|
||||
CheckedTransformer(std::initializer_list<std::pair<std::string, std::string>> values, Args &&... args)
|
||||
: CheckedTransformer(TransformPairs<std::string>(values), std::forward<Args>(args)...) {}
|
||||
|
||||
/// direct map of std::string to std::string
|
||||
|
Loading…
x
Reference in New Issue
Block a user