Refactoring; Avoid template<>

This commit is contained in:
Daniel Marjamäki 2020-02-01 08:39:58 +01:00
parent e515f4ab3e
commit 0e0d88f65e
1 changed files with 1 additions and 2 deletions

View File

@ -517,8 +517,7 @@ static void followVariableExpressionError(const Token *tok1, const Token *tok2,
errors->push_back(item);
}
template<class Predicate, class F>
static void findTokenValue(const Token* const tok, Predicate pred, F f)
static void findTokenValue(const Token* const tok, std::function<bool(const ValueFlow::Value &)> pred, std::function<void(const ValueFlow::Value &)> f)
{
auto x = std::find_if(tok->values().begin(), tok->values().end(), pred);
if (x != tok->values().end())