]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
#18708 EDF 20746 - Strange behaviors after loading YACS
authoreap <eap@opencascade.com>
Wed, 8 Jul 2020 09:46:18 +0000 (12:46 +0300)
committereap <eap@opencascade.com>
Wed, 8 Jul 2020 09:46:18 +0000 (12:46 +0300)
  Pb was in clashing class names (chrono.hxx) in SMESH and YACS

src/SMDS/chrono.cxx
src/SMDS/chrono.hxx

index ae198d95f993638e0d28b436c660fa2a275eb55b..c4ad47ec40c4b01758ac9f5a043783e734275d7e 100644 (file)
@@ -21,6 +21,7 @@
 #include "utilities.h"
 
 using namespace std;
+using namespace SMDS;
 
 cntStruct* counters::_ctrs = 0;
 int counters::_nbChrono = 0;
index 3fdae2eb22a3132fd07993bf74ba2c127d555a15..032ac935c2f8ad8b1f8737173f0c80b69ae06771 100644 (file)
@@ -27,6 +27,8 @@
 #include <iostream>
 #include <ctime>
 
+namespace SMDS
+{
 typedef struct acnt
 {
   char*  _ctrNames;
@@ -57,9 +59,11 @@ protected:
   int _ctr;
   clock_t _start, _end;
 };
-
+}
 #ifdef CHRONODEF
-#define CHRONO(i) counters::_ctrs[i]._ctrNames = (char *)__FILE__; \
+#define CHRONO(i)
+  using namespace SMDS; \
+  counters::_ctrs[i]._ctrNames = (char *)__FILE__;  \
   counters::_ctrs[i]._ctrLines = __LINE__; \
   salome_chrono aChrono##i(i);
 
@@ -67,7 +71,7 @@ protected:
 
 #else  // CHRONODEF
 
-#define CHRONO(i)
+#define CHRONO(i) using namespace SMDS;
 #define CHRONOSTOP(i)
 
 #endif // CHRONODEF