CMakePM: fix presets sort assert with MSVC in debug mode

Amends 9deef74d9e

Change-Id: Id4e7fcbfa6bdc8ac65afc2c93510e8389d7e7fe4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Cristian Adam
2023-02-02 12:53:57 +01:00
parent d8b2673ad1
commit 2eb9338be0

View File

@@ -98,10 +98,8 @@ Internal::PresetsData CMakeProject::combinePresets(Internal::PresetsData &cmakeP
auto resolveInherits = [](auto &presetsHash, auto &presetsList) {
Utils::sort(presetsList, [](const auto &left, const auto &right) {
if (left.inherits) {
if (left.inherits.value().contains(right.name))
return false;
}
if (!left.inherits || left.inherits.value().contains(right.name))
return false;
return true;
});
for (auto &p : presetsList) {