Hide windows.h in .cc file (#2952)

This commit is contained in:
Davis E. King 2024-04-27 10:57:23 -04:00 committed by GitHub
parent e9bd9b864a
commit fa0e3ff954
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 9 deletions

View File

@ -11,8 +11,8 @@
#include "misc_api_kernel_1.h"
#include "../windows_magic.h"
#include <mmsystem.h>
#include <windows.h>
#include <mmsystem.h>
// tell visual studio to link to the library needed to call timeGetTime()
#ifdef _MSC_VER

View File

@ -9,11 +9,20 @@
#include "threads_kernel_1.h"
#include "../windows_magic.h"
#include <windows.h>
#include <process.h>
namespace dlib
{
thread_id_type get_thread_id(
)
{
return GetCurrentThreadId();
}
namespace threads_kernel_shared_helpers
{

View File

@ -9,8 +9,6 @@
#include "threads_kernel_abstract.h"
#include "../windows_magic.h"
#include <windows.h>
#include "../algs.h"
#include <condition_variable>
#include <mutex>
@ -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();
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------