diff options
author | Denis Shienkov <denis.shienkov@gmail.com> | 2021-12-04 18:54:25 +0300 |
---|---|---|
committer | Denis Shienkov <denis.shienkov@gmail.com> | 2021-12-22 12:36:45 +0000 |
commit | c1ceee154478a4bdf70e39b3bfb7ae09bce43e90 (patch) | |
tree | a4708b7d2e2fa40775b895f12cc152e6e6a73f2d /src/plugins/generator/iarew | |
parent | 7663e2dc05840458123915c1eb2752f2b4cb2b03 (diff) |
Replace std::erase && std::remove_if chains with Internal::remove_if
Change-Id: Ia267b9419227db5f4382a33aa99eb7dbe0ada45f
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Diffstat (limited to 'src/plugins/generator/iarew')
-rw-r--r-- | src/plugins/generator/iarew/archs/stm8/stm8linkersettingsgroup_v3.cpp | 9 | ||||
-rw-r--r-- | src/plugins/generator/iarew/iarewproject.cpp | 8 |
2 files changed, 8 insertions, 9 deletions
diff --git a/src/plugins/generator/iarew/archs/stm8/stm8linkersettingsgroup_v3.cpp b/src/plugins/generator/iarew/archs/stm8/stm8linkersettingsgroup_v3.cpp index 066c47931..441333976 100644 --- a/src/plugins/generator/iarew/archs/stm8/stm8linkersettingsgroup_v3.cpp +++ b/src/plugins/generator/iarew/archs/stm8/stm8linkersettingsgroup_v3.cpp @@ -32,6 +32,8 @@ #include "../../iarewutils.h" +#include <tools/stlutils.h> + #include <QtCore/qdir.h> namespace qbs { @@ -100,14 +102,11 @@ struct ConfigPageOptions final // on the general page). configDefinitions = IarewUtils::flagValues( flags, QStringLiteral("--config_def")); - configDefinitions.erase(std::remove_if( - configDefinitions.begin(), - configDefinitions.end(), - [](const auto &definition){ + Internal::removeIf(configDefinitions, [](const auto &definition){ const auto def = definition.toString(); return def.startsWith(QLatin1String("_CSTACK_SIZE")) || def.startsWith(QLatin1String("_HEAP_SIZE")); - }), configDefinitions.end()); + }); } QVariantList configFilePaths; diff --git a/src/plugins/generator/iarew/iarewproject.cpp b/src/plugins/generator/iarew/iarewproject.cpp index f33ae4fcb..0387ae114 100644 --- a/src/plugins/generator/iarew/iarewproject.cpp +++ b/src/plugins/generator/iarew/iarewproject.cpp @@ -42,6 +42,8 @@ #include <logging/translator.h> +#include <tools/stlutils.h> + namespace qbs { IarewProject::IarewProject(const GeneratableProject &genProject, @@ -112,12 +114,10 @@ IarewProject::IarewProject(const GeneratableProject &genProject, continue; auto sourceArtifacts = group.sourceArtifacts(); // Remove the linker script artifacts. - sourceArtifacts.erase(std::remove_if(sourceArtifacts.begin(), - sourceArtifacts.end(), - [](const auto &artifact){ + Internal::removeIf(sourceArtifacts, [](const auto &artifact) { const auto tags = artifact.fileTags(); return tags.contains(QLatin1String("linkerscript")); - }), sourceArtifacts.end()); + }); if (sourceArtifacts.isEmpty()) continue; |