Make single-argument constructors explicit
This commit is contained in:
parent
0f007fa24e
commit
5300ba2074
|
@ -37,7 +37,7 @@ public:
|
||||||
* @param caseSensitive Match the case of the characters when
|
* @param caseSensitive Match the case of the characters when
|
||||||
* matching paths?
|
* 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.
|
* @brief Match path against list of masks.
|
||||||
|
|
|
@ -88,7 +88,7 @@ struct Filepointer {
|
||||||
unsigned int op_indent;
|
unsigned int op_indent;
|
||||||
enum AppendMode { UNKNOWN_AM, APPEND, APPEND_EX };
|
enum AppendMode { UNKNOWN_AM, APPEND, APPEND_EX };
|
||||||
AppendMode append_mode;
|
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) {
|
: mode(mode_), mode_indent(0), lastOperation(NONE), op_indent(0), append_mode(UNKNOWN_AM) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -40,12 +40,12 @@ public:
|
||||||
/** Store information about variable usage */
|
/** Store information about variable usage */
|
||||||
class VariableUsage {
|
class VariableUsage {
|
||||||
public:
|
public:
|
||||||
VariableUsage(const Variable *var = nullptr,
|
explicit VariableUsage(const Variable *var = nullptr,
|
||||||
VariableType type = standard,
|
VariableType type = standard,
|
||||||
bool read = false,
|
bool read = false,
|
||||||
bool write = false,
|
bool write = false,
|
||||||
bool modified = false,
|
bool modified = false,
|
||||||
bool allocateMemory = false) :
|
bool allocateMemory = false) :
|
||||||
_var(var),
|
_var(var),
|
||||||
_lastAccess(var?var->nameToken():0),
|
_lastAccess(var?var->nameToken():0),
|
||||||
_type(type),
|
_type(type),
|
||||||
|
|
|
@ -427,7 +427,7 @@ struct AST_state {
|
||||||
unsigned int depth;
|
unsigned int depth;
|
||||||
unsigned int inArrayAssignment;
|
unsigned int inArrayAssignment;
|
||||||
bool cpp;
|
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)
|
static bool iscast(const Token *tok)
|
||||||
|
|
Loading…
Reference in New Issue