From 4330f9fa4391b4d39c52c972c75327ed2ba6ce33 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 28 Oct 2019 09:03:10 +0100 Subject: Various fixes/workarounds to make cppcheck 1.72 (Ubuntu 16.04) and HEAD/1.90dev happy (fixes #1648) --- src/iso19111/factory.cpp | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'src/iso19111') diff --git a/src/iso19111/factory.cpp b/src/iso19111/factory.cpp index 6fef6366..e0a1b084 100644 --- a/src/iso19111/factory.cpp +++ b/src/iso19111/factory.cpp @@ -4379,19 +4379,17 @@ AuthorityFactory::createObjectsFromName( const auto &listOfRow = pair.second; for (const auto &row : listOfRow) { const auto &name = row[3]; - if (approximateMatch) { - bool match = - ci_find(name, searchedNameWithoutDeprecated) != - std::string::npos; - if (!match) { - const auto &canonicalizedName(pair.first); - match = ci_find(canonicalizedName, - canonicalizedSearchedName) != - std::string::npos; - } - if (!match) { - continue; - } + bool match = + ci_find(name, searchedNameWithoutDeprecated) != + std::string::npos; + if (!match) { + const auto &canonicalizedName(pair.first); + match = ci_find(canonicalizedName, + canonicalizedSearchedName) != + std::string::npos; + } + if (!match) { + continue; } const auto &auth_name = row[1]; -- cgit v1.2.3