Fix Cppcheck warning
This commit is contained in:
parent
aa35462add
commit
abf525e46d
|
@ -85,7 +85,7 @@ static const Token *skipMembers(const Token *tok)
|
||||||
return tok;
|
return tok;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CheckStl::isIterator(const Variable *var) const
|
static bool isIterator(const Variable *var)
|
||||||
{
|
{
|
||||||
// Check that its an iterator
|
// Check that its an iterator
|
||||||
if (!var || !var->isLocal() || !Token::Match(var->typeEndToken(), "iterator|const_iterator|reverse_iterator|const_reverse_iterator|auto"))
|
if (!var || !var->isLocal() || !Token::Match(var->typeEndToken(), "iterator|const_iterator|reverse_iterator|const_reverse_iterator|auto"))
|
||||||
|
|
|
@ -162,8 +162,6 @@ public:
|
||||||
void readingEmptyStlContainer();
|
void readingEmptyStlContainer();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool isIterator(const Variable *var) const;
|
|
||||||
|
|
||||||
void readingEmptyStlContainer_parseUsage(const Token* tok, const Library::Container* container, std::map<unsigned int, const Library::Container*>& empty, bool noerror);
|
void readingEmptyStlContainer_parseUsage(const Token* tok, const Library::Container* container, std::map<unsigned int, const Library::Container*>& empty, bool noerror);
|
||||||
|
|
||||||
void missingComparisonError(const Token *incrementToken1, const Token *incrementToken2);
|
void missingComparisonError(const Token *incrementToken1, const Token *incrementToken2);
|
||||||
|
|
Loading…
Reference in New Issue