diff --git a/cli/pathmatch.h b/cli/pathmatch.h index b7880a77c..e35228233 100644 --- a/cli/pathmatch.h +++ b/cli/pathmatch.h @@ -37,7 +37,7 @@ public: * @param caseSensitive Match the case of the characters when * matching paths? */ - PathMatch(const std::vector &masks, bool caseSensitive = true); + explicit PathMatch(const std::vector &masks, bool caseSensitive = true); /** * @brief Match path against list of masks. diff --git a/lib/checkio.cpp b/lib/checkio.cpp index 8b0424f4a..16ff14a44 100644 --- a/lib/checkio.cpp +++ b/lib/checkio.cpp @@ -88,7 +88,7 @@ struct Filepointer { unsigned int op_indent; enum AppendMode { UNKNOWN_AM, APPEND, APPEND_EX }; AppendMode append_mode; - Filepointer(OpenMode mode_ = UNKNOWN_OM) + explicit Filepointer(OpenMode mode_ = UNKNOWN_OM) : mode(mode_), mode_indent(0), lastOperation(NONE), op_indent(0), append_mode(UNKNOWN_AM) { } }; diff --git a/lib/checkunusedvar.cpp b/lib/checkunusedvar.cpp index 6f02fcf20..23a71d071 100644 --- a/lib/checkunusedvar.cpp +++ b/lib/checkunusedvar.cpp @@ -40,12 +40,12 @@ public: /** Store information about variable usage */ class VariableUsage { public: - VariableUsage(const Variable *var = nullptr, - VariableType type = standard, - bool read = false, - bool write = false, - bool modified = false, - bool allocateMemory = false) : + explicit VariableUsage(const Variable *var = nullptr, + VariableType type = standard, + bool read = false, + bool write = false, + bool modified = false, + bool allocateMemory = false) : _var(var), _lastAccess(var?var->nameToken():0), _type(type), diff --git a/lib/tokenlist.cpp b/lib/tokenlist.cpp index cf265e01f..271b28d19 100644 --- a/lib/tokenlist.cpp +++ b/lib/tokenlist.cpp @@ -427,7 +427,7 @@ struct AST_state { unsigned int depth; unsigned int inArrayAssignment; bool cpp; - AST_state(bool cpp_) : depth(0), inArrayAssignment(0), cpp(cpp_) {} + explicit AST_state(bool cpp_) : depth(0), inArrayAssignment(0), cpp(cpp_) {} }; static bool iscast(const Token *tok)