MSVC: Suppress warning

This commit is contained in:
wmayer
2024-07-25 20:06:07 +02:00
committed by wwmayer
parent dca41751f7
commit 6d8b9b0204

View File

@@ -255,10 +255,13 @@ void testFindSubShapesForSourceWithType(const TopoShape& source,
testFindSubShapesForSourceWithTypeAndIndex(shapeTypeStr, elementStdMap, shapeIndex);
}
QT_WARNING_PUSH
QT_WARNING_DISABLE_MSVC(4834) // Discarding a [[nodiscard]], which we are about to do...
// ... we also check that we don't find shapes that don't exist and therefore don't
// have either an IndexedName or a MappedName
IndexedName fakeIndexedName {shapeTypeStr.c_str(), (int)source.countSubElements(shapeType) + 1};
EXPECT_THROW(elementStdMap.at(fakeIndexedName), std::out_of_range);
QT_WARNING_POP
}
void TopoShapeMakeShapeWithElementMapTests::testFindSourceSubShapesInElementMapForSource(