Skip to content

Commit

Permalink
Hide windows.h in .cc file
Browse files Browse the repository at this point in the history
  • Loading branch information
davisking committed Apr 27, 2024
1 parent 87da295 commit 496c0b7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
9 changes: 9 additions & 0 deletions dlib/threads/threads_kernel_1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{

Expand Down
10 changes: 2 additions & 8 deletions dlib/threads/threads_kernel_1.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

#include "threads_kernel_abstract.h"

#include "../windows_magic.h"
#include <windows.h>
#include "../algs.h"
#include <condition_variable>
#include <mutex>
Expand All @@ -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();

// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
Expand Down

0 comments on commit 496c0b7

Please sign in to comment.