Eric Ramat il y a 4 ans
Parent
commit
30493b3894

+ 6 - 6
src/CMakeLists.txt

@@ -1,9 +1,9 @@
-IF ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
-    message("TRACE on")
-    add_definitions(-DWITH_TRACE)
-ELSE ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
-    message("TRACE off")
-ENDIF ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
+#IF ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
+#    message("TRACE on")
+#    add_definitions(-DWITH_TRACE)
+#ELSE ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
+#    message("TRACE off")
+#ENDIF ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
 
 ADD_SUBDIRECTORY(apps)
 ADD_SUBDIRECTORY(artis-star)

+ 1 - 1
src/artis-star/common/ExternalEvent.hpp

@@ -94,7 +94,7 @@ namespace artis {
                 } else {
                     ss << "null";
                 }
-                ss << ")";
+                ss << " )";
                 return ss.str();
             }
 

+ 5 - 0
src/artis-star/common/Value.hpp

@@ -104,6 +104,11 @@ namespace artis {
                 } else if (is_type<int>()) {
                     int v;
 
+                    operator()(v);
+                    return std::to_string(v);
+                } else if (is_type<unsigned int>()) {
+                    unsigned int v;
+
                     operator()(v);
                     return std::to_string(v);
                 } else if (is_type<bool>()) {

+ 5 - 2
src/artis-star/common/utils/Trace.hpp

@@ -170,7 +170,10 @@ namespace artis {
 
             static Trace& trace()
             {
-                std::call_once(_flag, []() { _instance.reset(new Trace()); });
+//                std::call_once(_flag, []() { _instance.reset(new Trace()); });
+                if (!_instance) {
+                    _instance.reset(new Trace());
+                }
                 return *_instance;
             }
 
@@ -206,7 +209,7 @@ namespace artis {
             Trace() { _sstream = 0; }
 
             static std::shared_ptr<Trace<Time> > _instance;
-            static std::once_flag _flag;
+//            static std::once_flag _flag;
 
             TraceElements<Time> _trace;
             TraceElement<Time> _element;