diff --git a/dlib/misc_api/misc_api_kernel_1.cpp b/dlib/misc_api/misc_api_kernel_1.cpp index f17d850e1..a40d83e02 100644 --- a/dlib/misc_api/misc_api_kernel_1.cpp +++ b/dlib/misc_api/misc_api_kernel_1.cpp @@ -11,8 +11,8 @@ #include "misc_api_kernel_1.h" #include "../windows_magic.h" -#include #include +#include // tell visual studio to link to the library needed to call timeGetTime() #ifdef _MSC_VER diff --git a/dlib/threads/threads_kernel_1.cpp b/dlib/threads/threads_kernel_1.cpp index cb36b8d3f..178e9f5ac 100644 --- a/dlib/threads/threads_kernel_1.cpp +++ b/dlib/threads/threads_kernel_1.cpp @@ -9,11 +9,20 @@ #include "threads_kernel_1.h" +#include "../windows_magic.h" +#include + #include namespace dlib { + thread_id_type get_thread_id( + ) + { + return GetCurrentThreadId(); + } + namespace threads_kernel_shared_helpers { diff --git a/dlib/threads/threads_kernel_1.h b/dlib/threads/threads_kernel_1.h index 11acad5a5..426e6f023 100644 --- a/dlib/threads/threads_kernel_1.h +++ b/dlib/threads/threads_kernel_1.h @@ -9,8 +9,6 @@ #include "threads_kernel_abstract.h" -#include "../windows_magic.h" -#include #include "../algs.h" #include #include @@ -22,13 +20,9 @@ namespace dlib // ---------------------------------------------------------------------------------------- - typedef DWORD thread_id_type; + typedef unsigned long thread_id_type; - inline thread_id_type get_thread_id ( - ) - { - return GetCurrentThreadId(); - } + thread_id_type get_thread_id(); // ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------