forked from qt-creator/qt-creator
CMake: Avoid redundant copy
Amends commit e8802d92e3.
Reported by Coverity.
Change-Id: Ibc0b1cdf1918d5bfed5104f14098096d158526e2
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
55760cb5f7
commit
a5e98b1fa0
@@ -545,7 +545,7 @@ ToolChain *findExternalToolchain(const QString &presetArchitecture, const QStrin
|
|||||||
};
|
};
|
||||||
|
|
||||||
Abi::OSFlavor toolsetAbi = Abi::UnknownFlavor;
|
Abi::OSFlavor toolsetAbi = Abi::UnknownFlavor;
|
||||||
for (auto abiPair : abiTable) {
|
for (const auto &abiPair : abiTable) {
|
||||||
if (presetToolset.contains(abiPair.first)) {
|
if (presetToolset.contains(abiPair.first)) {
|
||||||
toolsetAbi = abiPair.second;
|
toolsetAbi = abiPair.second;
|
||||||
break;
|
break;
|
||||||
@@ -554,7 +554,7 @@ ToolChain *findExternalToolchain(const QString &presetArchitecture, const QStrin
|
|||||||
|
|
||||||
// User didn't specify any flavor, so pick the highest toolchain available
|
// User didn't specify any flavor, so pick the highest toolchain available
|
||||||
if (toolsetAbi == Abi::UnknownFlavor) {
|
if (toolsetAbi == Abi::UnknownFlavor) {
|
||||||
for (auto abiPair : abiTable) {
|
for (const auto &abiPair : abiTable) {
|
||||||
if (msvcFlavors.contains(abiPair.second)) {
|
if (msvcFlavors.contains(abiPair.second)) {
|
||||||
toolsetAbi = abiPair.second;
|
toolsetAbi = abiPair.second;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user