removed unnecessary varid0 inline suppressions (#3893)
This commit is contained in:
parent
3df170c191
commit
757287b13c
|
@ -48,7 +48,6 @@ bool isZero(T x)
|
||||||
template<class R, class T>
|
template<class R, class T>
|
||||||
R calculate(const std::string& s, const T& x, const T& y, bool* error = nullptr)
|
R calculate(const std::string& s, const T& x, const T& y, bool* error = nullptr)
|
||||||
{
|
{
|
||||||
// cppcheck-suppress varid0
|
|
||||||
auto wrap = [](T z) {
|
auto wrap = [](T z) {
|
||||||
return R{z};
|
return R{z};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1163,7 +1163,6 @@ static int estimateSize(const Type* type, const Settings* settings, const Symbol
|
||||||
|
|
||||||
int cumulatedSize = 0;
|
int cumulatedSize = 0;
|
||||||
const bool isUnion = type->classScope->type == Scope::ScopeType::eUnion;
|
const bool isUnion = type->classScope->type == Scope::ScopeType::eUnion;
|
||||||
// cppcheck-suppress varid0
|
|
||||||
const auto accumulateSize = [](int& cumulatedSize, int size, bool isUnion) -> void {
|
const auto accumulateSize = [](int& cumulatedSize, int size, bool isUnion) -> void {
|
||||||
if (isUnion)
|
if (isUnion)
|
||||||
cumulatedSize = std::max(cumulatedSize, size);
|
cumulatedSize = std::max(cumulatedSize, size);
|
||||||
|
|
|
@ -58,7 +58,6 @@ std::string Summaries::create(const Tokenizer *tokenizer, const std::string &cfg
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write summary for function
|
// Write summary for function
|
||||||
// cppcheck-suppress varid0
|
|
||||||
auto join = [](const std::set<std::string> &data) -> std::string {
|
auto join = [](const std::set<std::string> &data) -> std::string {
|
||||||
std::string ret;
|
std::string ret;
|
||||||
const char *sep = "";
|
const char *sep = "";
|
||||||
|
|
|
@ -3995,7 +3995,6 @@ void Function::addArguments(const SymbolDatabase *symbolDatabase, const Scope *s
|
||||||
argType = findVariableTypeIncludingUsedNamespaces(symbolDatabase, scope, typeTok);
|
argType = findVariableTypeIncludingUsedNamespaces(symbolDatabase, scope, typeTok);
|
||||||
|
|
||||||
// save type
|
// save type
|
||||||
// cppcheck-suppress varid0
|
|
||||||
const_cast<Token *>(typeTok)->type(argType);
|
const_cast<Token *>(typeTok)->type(argType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4294,7 +4294,6 @@ static void valueFlowLifetime(TokenList *tokenlist, SymbolDatabase*, ErrorLogger
|
||||||
};
|
};
|
||||||
|
|
||||||
bool update = false;
|
bool update = false;
|
||||||
// cppcheck-suppress varid0
|
|
||||||
auto captureVariable = [&](const Token* tok2, LifetimeCapture c, std::function<bool(const Token*)> pred) {
|
auto captureVariable = [&](const Token* tok2, LifetimeCapture c, std::function<bool(const Token*)> pred) {
|
||||||
if (varids.count(tok->varId()) > 0)
|
if (varids.count(tok->varId()) > 0)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue