diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index 47fd6ddefa3..d8ab5b82615 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -434,8 +434,8 @@ int main(int argc, char *argv[]) { } if (setup.useCanonicalLibNames) { - for (auto& lib : setup.libraries) { - lib = getCanonicalLibName(lib); + for (StringList::iterator lib = setup.libraries.begin(); lib != setup.libraries.end(); ++lib) { + *lib = getCanonicalLibName(*lib); } } @@ -741,8 +741,8 @@ void displayHelp(const char *exe) { " --tests Create project files for the tests\n" " (ignores --build-events and --installer, as well as engine settings)\n" " (default: false)\n" - " --use-canonical-lib-names Use canonical library names for linking. This makes it easy to use\n" - " e.g. vcpkg-provided libraries\n" + " --use-canonical-lib-names Use canonical library names for linking. This makes it easy to use\n" + " e.g. vcpkg-provided libraries\n" " (default: false)\n" "\n" "Engines settings:\n" @@ -1160,8 +1160,8 @@ std::string getMSVCConfigName(MSVC_Architecture arch) { } std::string getCanonicalLibName(std::string lib) { - auto it = s_canonical_lib_name_map.find(lib); - if (it != s_canonical_lib_name_map.end()) { + std::map::const_iterator it = s_canonical_lib_name_map.find(lib); + if (it != s_canonical_lib_name_map.cend()) { return it->second; } return lib; @@ -1234,12 +1234,12 @@ bool getFeatureBuildState(const std::string &name, FeatureList &features) { BuildSetup removeFeatureFromSetup(BuildSetup setup, const std::string &feature) { for (FeatureList::const_iterator i = setup.features.begin(); i != setup.features.end(); ++i) { if (i->enable && feature == i->name) { - StringList fribidi_libs = getFeatureLibraries(*i); - for (auto& lib : fribidi_libs) { + StringList feature_libs = getFeatureLibraries(*i); + for (StringList::iterator lib = feature_libs.begin(); lib != feature_libs.end(); ++lib) { if (setup.useCanonicalLibNames) { - lib = getCanonicalLibName(lib); + *lib = getCanonicalLibName(*lib); } - setup.libraries.remove(lib); + setup.libraries.remove(*lib); } if (i->define && i->define[0]) { setup.defines.remove(i->define); diff --git a/devtools/create_project/create_project.h b/devtools/create_project/create_project.h index 4ad3209cfe7..6853b244f8c 100644 --- a/devtools/create_project/create_project.h +++ b/devtools/create_project/create_project.h @@ -206,7 +206,7 @@ StringList getFeatureLibraries(const FeatureList &features); * * @param features Feature for the build (this may contain features, which are *not* enabled!) */ -StringList getFeatureLibraries(const Feature& feature); +StringList getFeatureLibraries(const Feature &feature); /** * Sets the state of a given feature. This can be used to diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp index c6d50c32ae7..c8c6ec3f546 100644 --- a/devtools/create_project/msbuild.cpp +++ b/devtools/create_project/msbuild.cpp @@ -25,7 +25,6 @@ #include #include -#include namespace CreateProjectTool { @@ -81,7 +80,10 @@ void MSBuildProvider::createProjectFile(const std::string &name, const std::stri "\n" "\t\n"; - std::array archs{ MSVC_Architecture::ARCH_X86, MSVC_Architecture::ARCH_AMD64, MSVC_Architecture::ARCH_ARM64 }; + std::list archs; + archs.push_back(MSVC_Architecture::ARCH_X86); + archs.push_back(MSVC_Architecture::ARCH_AMD64); + archs.push_back(MSVC_Architecture::ARCH_ARM64); for (const auto& arch : archs) { // NOTE: different order diff --git a/devtools/create_project/msvc.cpp b/devtools/create_project/msvc.cpp index 9a2328ab5e7..90cc32e0d49 100644 --- a/devtools/create_project/msvc.cpp +++ b/devtools/create_project/msvc.cpp @@ -176,10 +176,10 @@ void MSVCProvider::createGlobalProp(const BuildSetup &setup) { error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(MSVC_Architecture::ARCH_AMD64) + getPropertiesExtension() + "\" for writing"); BuildSetup amd64setup = setup; - auto amd64_disabled_features_it = s_arch_disabled_features.find(MSVC_Architecture::ARCH_AMD64); + std::map::const_iterator amd64_disabled_features_it = s_arch_disabled_features.find(MSVC_Architecture::ARCH_AMD64); if (amd64_disabled_features_it != s_arch_disabled_features.end()) { - for (auto feature : amd64_disabled_features_it->second) { - amd64setup = removeFeatureFromSetup(amd64setup, feature); + for (StringList::const_iterator feature = amd64_disabled_features_it->second.begin(); feature != amd64_disabled_features_it->second.end(); ++feature) { + amd64setup = removeFeatureFromSetup(amd64setup, *feature); } } @@ -191,10 +191,10 @@ void MSVCProvider::createGlobalProp(const BuildSetup &setup) { error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(MSVC_Architecture::ARCH_ARM64) + getPropertiesExtension() + "\" for writing"); BuildSetup arm64setup = setup; - auto arm64_disabled_features_it = s_arch_disabled_features.find(MSVC_Architecture::ARCH_ARM64); + std::map::const_iterator arm64_disabled_features_it = s_arch_disabled_features.find(MSVC_Architecture::ARCH_ARM64); if (arm64_disabled_features_it != s_arch_disabled_features.end()) { - for (auto feature : arm64_disabled_features_it->second) { - arm64setup = removeFeatureFromSetup(arm64setup, feature); + for (StringList::const_iterator feature = arm64_disabled_features_it->second.begin(); feature != arm64_disabled_features_it->second.end(); ++feature) { + arm64setup = removeFeatureFromSetup(arm64setup, *feature); } } outputGlobalPropFile(arm64setup, properties, MSVC_Architecture::ARCH_ARM64, arm64setup.defines, convertPathToWin(setup.filePrefix), setup.runBuildEvents);