diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-08-26 18:36:18 +0200 |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-08-27 17:31:46 +0200 |
commit | 32b15d320f9afd858a5966744dda5568cd396798 (patch) | |
tree | 64e12ae21c64d80cf96b28c3131083b7470ec9e4 /Source/cmQtAutoMocUic.cxx | |
parent | b66cd3fe63d381ed2d26191fe440b59bf01fc67b (diff) | |
download | cmake-32b15d320f9afd858a5966744dda5568cd396798.tar.gz |
Autogen: cmQtAutoMocUic settings hash computation optimizations
Diffstat (limited to 'Source/cmQtAutoMocUic.cxx')
-rw-r--r-- | Source/cmQtAutoMocUic.cxx | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/Source/cmQtAutoMocUic.cxx b/Source/cmQtAutoMocUic.cxx index d4d9e56d8b..133bae5b86 100644 --- a/Source/cmQtAutoMocUic.cxx +++ b/Source/cmQtAutoMocUic.cxx @@ -1912,22 +1912,19 @@ void cmQtAutoMocUic::SettingsFileRead() // Compose current settings strings { cmCryptoHash cryptoHash(cmCryptoHash::AlgoSHA256); - std::string const sep(";"); - auto cha = [&cryptoHash, &sep](std::string const& value) { + auto cha = [&cryptoHash](cm::string_view value) { cryptoHash.Append(value); - cryptoHash.Append(sep); + cryptoHash.Append(";"); }; if (MocConst_.Enabled) { cryptoHash.Initialize(); cha(MocConst().Executable); - for (auto const& value : MocConst().AllOptions) { - cha(value); - } + std::for_each(MocConst().AllOptions.begin(), MocConst().AllOptions.end(), + cha); cha(BaseConst().IncludeProjectDirsBefore ? "TRUE" : "FALSE"); - for (auto const& value : MocConst().PredefsCmd) { - cha(value); - } + std::for_each(MocConst().PredefsCmd.begin(), MocConst().PredefsCmd.end(), + cha); for (auto const& filter : MocConst().DependFilters) { cha(filter.Key); } @@ -1940,14 +1937,11 @@ void cmQtAutoMocUic::SettingsFileRead() if (UicConst().Enabled) { cryptoHash.Initialize(); cha(UicConst().Executable); - for (auto const& value : UicConst().TargetOptions) { - cha(value); - } + std::for_each(UicConst().TargetOptions.begin(), + UicConst().TargetOptions.end(), cha); for (const auto& item : UicConst().Options) { cha(item.first); - for (auto const& svalue : item.second) { - cha(svalue); - } + std::for_each(item.second.begin(), item.second.end(), cha); } SettingsStringUic_ = cryptoHash.FinalizeHex(); } |