From c607e2a6d2eb9193c9dcb1a415dba710ec115f07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org> Date: Wed, 17 Jul 2024 15:34:19 +0200 Subject: [PATCH] C++20 modernization: use std::ranges::none_of --- src/SymbolList.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SymbolList.cc b/src/SymbolList.cc index f06c854c..40293ce7 100644 --- a/src/SymbolList.cc +++ b/src/SymbolList.cc @@ -1,5 +1,5 @@ /* - * Copyright © 2003-2022 Dynare Team + * Copyright © 2003-2024 Dynare Team * * This file is part of Dynare. * @@ -57,8 +57,8 @@ SymbolList::checkPass(WarningConsolidation& warnings, const vector<SymbolType>& throw SymbolListException {"Variable " + symbol + " was not declared."}; } - if (none_of(types.begin(), types.end(), - [&](SymbolType type) { return symbol_table.getType(symbol) == type; })) + if (ranges::none_of(types, + [&](SymbolType type) { return symbol_table.getType(symbol) == type; })) { string valid_types; for (auto type : types) -- GitLab