ithewei 3 gadi atpakaļ
vecāks
revīzija
f13c5ad11f
4 mainītis faili ar 6 papildinājumiem un 3 dzēšanām
  1. 0 2
      base/hplatform.h
  2. 1 0
      cpputil/hthreadpool.h
  3. 1 1
      examples/hloop_test.c
  4. 4 0
      hexport.h

+ 0 - 2
base/hplatform.h

@@ -109,8 +109,6 @@
 #pragma warning (disable: 4100) // unused param
 #pragma warning (disable: 4102) // unreferenced label
 #pragma warning (disable: 4244) // conversion loss of data
-#pragma warning (disable: 4251) // STL dll
-#pragma warning (disable: 4275) // dll-interface
 #pragma warning (disable: 4267) // size_t => int
 #pragma warning (disable: 4819) // Unicode
 #pragma warning (disable: 4996) // _CRT_SECURE_NO_WARNINGS

+ 1 - 0
cpputil/hthreadpool.h

@@ -183,6 +183,7 @@ protected:
         data.id = thread->get_id();
         data.status = RUNNING;
         data.start_time = time(NULL);
+        data.stop_time = 0;
         threads.emplace_back(data);
         thread_mutex.unlock();
     }

+ 1 - 1
examples/hloop_test.c

@@ -108,7 +108,7 @@ int main() {
         memset(&ev, 0, sizeof(ev));
         ev.event_type = (hevent_type_e)(HEVENT_TYPE_CUSTOM + i);
         ev.cb = on_custom_events;
-        ev.userdata = (void*)(long)i;
+        ev.userdata = (void*)(intptr_t)i;
         hloop_post_event(loop, &ev);
     }
 

+ 4 - 0
hexport.h

@@ -135,6 +135,10 @@ struct s
 
 // MSVC ports
 #ifdef _MSC_VER
+
+#pragma warning (disable: 4251) // STL dll
+#pragma warning (disable: 4275) // dll-interface
+
 #if _MSC_VER < 1900 // < VS2015
 
 #ifndef __cplusplus