From b0676d057896d0a2d09eb2ec37dcf0fc7dc7d11d Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 12 Jul 2024 20:04:07 +0200 Subject: [PATCH] Tests: Fix warnings: unknown pragma ignored [-Wunknown-pragmas] --- .../Part/App/TopoShapeMakeShapeWithElementMap.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/src/Mod/Part/App/TopoShapeMakeShapeWithElementMap.cpp b/tests/src/Mod/Part/App/TopoShapeMakeShapeWithElementMap.cpp index b5910c5145..228a5df1a2 100644 --- a/tests/src/Mod/Part/App/TopoShapeMakeShapeWithElementMap.cpp +++ b/tests/src/Mod/Part/App/TopoShapeMakeShapeWithElementMap.cpp @@ -233,14 +233,14 @@ void testFindSubShapesForSourceWithTypeAndIndex(const std::string& shapeTypeStr, MappedName mappedName {elementStdMap[indexedName]}; const char shapeTypePrefix {indexedName.toString()[0]}; -#pragma warning(push) -#pragma warning(disable : 4834) // Discarding a [[nodiscard]], which we are about to do... - EXPECT_NO_THROW(elementStdMap.at(indexedName)); // We check that the IndexedName - // is one of the keys... - EXPECT_NE(mappedName.find(shapeName.c_str()), - -1); // ... that the element name is in the MappedName... + QT_WARNING_PUSH + QT_WARNING_DISABLE_MSVC(4834) // Discarding a [[nodiscard]], which we are about to do... + // We check that the IndexedName is one of the keys... + EXPECT_NO_THROW(elementStdMap.at(indexedName)); + // ... that the element name is in the MappedName... + EXPECT_NE(mappedName.find(shapeName.c_str()), -1); EXPECT_EQ(mappedName.toString().back(), shapeTypePrefix); -#pragma warning(pop) + QT_WARNING_POP } void testFindSubShapesForSourceWithType(const TopoShape& source,