]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
[bos #32517][EDF] Dynamic logging: Removed balanced (void)0 part from the macros... kleontev/32517_dynamic_log_messages
authorKonstantin LEONTEV <konstantin.leontev@opencascade.com>
Thu, 10 Nov 2022 16:23:10 +0000 (19:23 +0300)
committerKonstantin LEONTEV <konstantin.leontev@opencascade.com>
Thu, 10 Nov 2022 16:23:10 +0000 (19:23 +0300)
src/SALOMELocalTrace/utilities.h

index 52945c85d7f16bb86d7b3c8a8abe335a5bbcb698..aeea32f8db45fe53162fa7e36e46934dc099b903 100644 (file)
 // --- the following MACROS can be enabled in debug and release versions
 // --- by SALOME_VERBOSE environment variable
 
-#define INFOS_COMPILATION if (SALOME::VerbosityActivated()) { MESS_BEGIN("COMPILED with ") << COMPILER \
+#define INFOS_COMPILATION if (SALOME::VerbosityActivated()) { MESS_BEGIN("COMPILED with ") << COMPILER \
                                        << ", " << __DATE__ \
-                                       << " at " << __TIME__ << MESS_END } else (void)0
+                                       << " at " << __TIME__ << MESS_END }}
                                                                                 
 
-#define MESSAGE(msg) if (SALOME::VerbosityActivated()) {MESS_BEGIN("- Trace ") << msg << MESS_END} else (void)0
-#define SCRUTE(var)  if (SALOME::VerbosityActivated()) {MESS_BEGIN("- Trace ") << #var << "=" << var <<MESS_END} else (void)0
+#define MESSAGE(msg) { if (SALOME::VerbosityActivated()) {MESS_BEGIN("- Trace ") << msg << MESS_END}}
+#define SCRUTE(var)  { if (SALOME::VerbosityActivated()) {MESS_BEGIN("- Trace ") << #var << "=" << var <<MESS_END}}
 
 #define REPERE ("------- ")
-#define BEGIN_OF(msg) if (SALOME::VerbosityActivated()) {MESS_BEGIN(REPERE) << "Begin of: " << msg << MESS_END} else (void)0
-#define END_OF(msg)   if (SALOME::VerbosityActivated()) {MESS_BEGIN(REPERE) << "Normal end of: " << msg << MESS_END} else (void)0
+#define BEGIN_OF(msg) { if (SALOME::VerbosityActivated()) {MESS_BEGIN(REPERE) << "Begin of: " << msg << MESS_END}}
+#define END_OF(msg)   { if (SALOME::VerbosityActivated()) {MESS_BEGIN(REPERE) << "Normal end of: " << msg << MESS_END}}
 
 #ifndef ASSERT
 #define ASSERT(condition) \
-        if (SALOME::VerbosityActivated()) { \
+        if (SALOME::VerbosityActivated()) { \
         if (!(condition)){INTERRUPTION("CONDITION "<<#condition<<" NOT VERIFIED")} \
-        }  else (void)0
+        }}
 #endif /* ASSERT */
 
 #endif /* ifndef UTILITIES_H */