Make single-argument constructors explicit

This commit is contained in:
Alexander Mai 2014-11-13 21:39:14 +01:00
parent 0f007fa24e
commit 5300ba2074
4 changed files with 9 additions and 9 deletions

View File

@ -37,7 +37,7 @@ public:
* @param caseSensitive Match the case of the characters when
* matching paths?
*/
PathMatch(const std::vector<std::string> &masks, bool caseSensitive = true);
explicit PathMatch(const std::vector<std::string> &masks, bool caseSensitive = true);
/**
* @brief Match path against list of masks.

View File

@ -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) {
}
};

View File

@ -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),

View File

@ -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)