aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/qbs-setup-toolchains/msvcprobe.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/qbs-setup-toolchains/msvcprobe.cpp')
-rw-r--r--src/app/qbs-setup-toolchains/msvcprobe.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/app/qbs-setup-toolchains/msvcprobe.cpp b/src/app/qbs-setup-toolchains/msvcprobe.cpp
index a0fa7cee6..84d36753e 100644
--- a/src/app/qbs-setup-toolchains/msvcprobe.cpp
+++ b/src/app/qbs-setup-toolchains/msvcprobe.cpp
@@ -140,7 +140,7 @@ void msvcProbe(Settings *settings, std::vector<Profile> &profiles)
}
}
- for (const WinSDK &sdk : qAsConst(winSDKs)) {
+ for (const WinSDK &sdk : std::as_const(winSDKs)) {
qbsInfo() << Tr::tr(" Windows SDK %1 detected:\n"
" installed in %2").arg(sdk.version, sdk.vcInstallPath);
if (sdk.isDefault)
@@ -150,7 +150,7 @@ void msvcProbe(Settings *settings, std::vector<Profile> &profiles)
// 2) Installed MSVCs
std::vector<MSVC> msvcs = MSVC::installedCompilers(ConsoleLogger::instance());
- for (const MSVC &msvc : qAsConst(msvcs)) {
+ for (const MSVC &msvc : std::as_const(msvcs)) {
qbsInfo() << Tr::tr(" MSVC %1 (%2) detected in\n"
" %3").arg(msvc.version, msvc.architecture,
QDir::toNativeSeparators(msvc.binPath));
@@ -164,10 +164,10 @@ void msvcProbe(Settings *settings, std::vector<Profile> &profiles)
qbsInfo() << Tr::tr("Detecting build environment...");
std::vector<MSVC *> msvcPtrs;
- msvcPtrs.resize(winSDKs.size() + msvcs.size());
- std::transform(winSDKs.begin(), winSDKs.end(), msvcPtrs.begin(),
+ msvcPtrs.reserve(winSDKs.size() + msvcs.size());
+ std::transform(winSDKs.begin(), winSDKs.end(), std::back_inserter(msvcPtrs),
[] (WinSDK &sdk) -> MSVC * { return &sdk; });
- std::transform(msvcs.begin(), msvcs.end(), msvcPtrs.begin() + winSDKs.size(),
+ std::transform(msvcs.begin(), msvcs.end(), std::back_inserter(msvcPtrs),
[] (MSVC &msvc) -> MSVC * { return &msvc; });
VsEnvironmentDetector envDetector;
@@ -195,7 +195,7 @@ void msvcProbe(Settings *settings, std::vector<Profile> &profiles)
// a new group of compilers of the same version incrementing the set size
msvcVersions.insert(msvc.vcInstallPath);
// index is the number of specific vcInstallPaths (e.g. compiler versions) seen so far
- const qsizetype index = msvcVersions.size() - 1;
+ const size_t index = msvcVersions.size() - 1;
const QString suffix = index == 0 ? QString() : QStringLiteral("-%1").arg(index);
const QString name = QLatin1String("MSVC") + msvc.version + suffix + QLatin1Char('-')
+ msvc.architecture;