Skip to content

Commit

Permalink
MSVC: Suppress warning
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Jul 25, 2024
1 parent 8de6e5e commit 61c964c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/src/Mod/Part/App/TopoShapeMakeShapeWithElementMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 61c964c

Please sign in to comment.