From: eap Date: Wed, 8 Jul 2020 09:46:18 +0000 (+0300) Subject: #18708 EDF 20746 - Strange behaviors after loading YACS X-Git-Tag: V9_6_0a1~19 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=29c693b1c362e8045aaab556ec5d8c612294e22e;p=modules%2Fsmesh.git #18708 EDF 20746 - Strange behaviors after loading YACS Pb was in clashing class names (chrono.hxx) in SMESH and YACS --- diff --git a/src/SMDS/chrono.cxx b/src/SMDS/chrono.cxx index ae198d95f..c4ad47ec4 100644 --- a/src/SMDS/chrono.cxx +++ b/src/SMDS/chrono.cxx @@ -21,6 +21,7 @@ #include "utilities.h" using namespace std; +using namespace SMDS; cntStruct* counters::_ctrs = 0; int counters::_nbChrono = 0; diff --git a/src/SMDS/chrono.hxx b/src/SMDS/chrono.hxx index 3fdae2eb2..032ac935c 100644 --- a/src/SMDS/chrono.hxx +++ b/src/SMDS/chrono.hxx @@ -27,6 +27,8 @@ #include #include +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