0028355: Stating wrong parent class in DEFINE_STANDARD_RTTIEXT is not recognized...
authorBenjamin Bihler <benjamin.bihler@compositence.de>
Thu, 19 Jan 2017 13:48:08 +0000 (16:48 +0300)
committerapn <apn@opencascade.com>
Thu, 19 Jan 2017 14:25:56 +0000 (17:25 +0300)
commit0e9fe060f3544ca854ca5953666800b70e56bb20
tree700695fa9870b660f6dcd2500380ea71f82aa42a
parentf63101c9845b807ccbf8ddeb66199e879a92244a
0028355: Stating wrong parent class in DEFINE_STANDARD_RTTIEXT is not recognized during compilation

Added compile-time checks (static_assert) in DEFINE_STANDARD_RTTI*(A,B) macros to check that A is actually the class being defined, and B is its base class.
For GCC compiler version 4.7 and later on, check ensures that B is direct base class of A.

Fixed dubious RTTI definitions.
samples/qt/FuncDemo/src/CircleDriver.h
samples/qt/FuncDemo/src/ConeDriver.h
samples/qt/FuncDemo/src/CylinderDriver.h
samples/qt/FuncDemo/src/PointDriver.h
samples/qt/FuncDemo/src/PrismDriver.h
samples/qt/FuncDemo/src/ShapeSaverDriver.h
src/AIS/AIS_AnimationTimer.hxx
src/SelectMgr/SelectMgr_TriangularFrustum.hxx
src/Standard/Standard_Type.hxx
src/StepVisual/StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.hxx
src/ViewerTest/ViewerTest_ObjectCommands.cxx