Fix Cppcheck self check warnings
This commit is contained in:
parent
986f658e39
commit
dc63dd6ada
|
@ -568,15 +568,15 @@ void CheckClass::initVar(std::vector<Usage> &usageList, nonneg int varid)
|
|||
}
|
||||
}
|
||||
|
||||
void CheckClass::assignAllVar(std::vector<Usage> &usage)
|
||||
void CheckClass::assignAllVar(std::vector<Usage> &usageList)
|
||||
{
|
||||
for (Usage & i : usage)
|
||||
for (Usage & i : usageList)
|
||||
i.assign = true;
|
||||
}
|
||||
|
||||
void CheckClass::clearAllVar(std::vector<Usage> &usage)
|
||||
void CheckClass::clearAllVar(std::vector<Usage> &usageList)
|
||||
{
|
||||
for (Usage & i : usage) {
|
||||
for (Usage & i : usageList) {
|
||||
i.assign = false;
|
||||
i.init = false;
|
||||
}
|
||||
|
|
|
@ -274,7 +274,7 @@ private:
|
|||
// constructors helper function
|
||||
/** @brief Information about a member variable. Used when checking for uninitialized variables */
|
||||
struct Usage {
|
||||
Usage(const Variable *var) : var(var), assign(false), init(false) { }
|
||||
explicit Usage(const Variable *var) : var(var), assign(false), init(false) { }
|
||||
|
||||
/** Variable that this usage is for */
|
||||
const Variable *var;
|
||||
|
|
Loading…
Reference in New Issue