Salome HOME
#18963 Minimize compiler warnings
[modules/smesh.git] / src / SMESH_I / SMESH_2smeshpy.cxx
index db7e04afa7a985ce7c01a20a1f017c8c5f15ef5c..9603f3443fc2eef55f7745d2999ee1c813f6b537 100644 (file)
@@ -931,7 +931,8 @@ Handle(_pyCommand) _pyGen::AddCommand( const TCollection_AsciiString& theCommand
           Threshold = SMESH + types[ iGeom ];
 #ifdef _DEBUG_
         // is types complete? (compilation failure means that enum GeometryType changed)
-        int _asrt[( sizeof(types) / sizeof(const char*) == nbTypes ) ? 2 : -1 ]; _asrt[0]=_asrt[1]; // _asrt[1] may be used uninitialized => replace this with static_assert?
+        static_assert( sizeof(types) / sizeof(const char*) == nbTypes,
+                       "Update names of GeometryType's!!!" );
 #endif
       }
       if (Type == "SMESH.FT_EntityType")
@@ -951,7 +952,8 @@ Handle(_pyCommand) _pyGen::AddCommand( const TCollection_AsciiString& theCommand
           Threshold = SMESH + types[ iGeom ];
 #ifdef _DEBUG_
         // is 'types' complete? (compilation failure means that enum EntityType changed)
-        int _asrt[( sizeof(types) / sizeof(const char*) == nbTypes ) ? 2 : -1 ]; _asrt[0]=_asrt[1]; // _asrt[1] may be used uninitialized => replace this with static_assert?
+        static_assert( sizeof(types) / sizeof(const char*) == nbTypes,
+                       "Update names of EntityType's!!!" );
 #endif
       }
     }