Skip to content

Commit

Permalink
[Core] Fix windows build (#1684)
Browse files Browse the repository at this point in the history
  • Loading branch information
MFransen69 authored Jul 2, 2024
1 parent 850b57b commit 7f048da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Source/core/SocketPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@
#define __ERROR_CONNRESET__ WSAECONNRESET
#define __ERROR_NETWORK_UNREACHABLE__ WSAENETUNREACH
PUSH_WARNING(DISABLE_WARNING_THIS_IN_MEMBER_INITIALIZER_LIST)
#else
#endif

#ifdef __APPLE__
#define IPV6_PACKAGE_TYPE IPV6_RECVPKTINFO
#else
#define IPV6_PACKAGE_TYPE IPV6_PKTINFO
#endif
#endif


namespace Thunder {
namespace Core {
Expand Down
11 changes: 6 additions & 5 deletions Source/core/Thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ namespace Core {
// then it is up to us.
if (m_hThreadInstance == nullptr)
#endif
std::string convertedName;
if (threadName != nullptr) {
Core::ToString(threadName, convertedName);
}

#ifdef __POSIX__
int err;
Expand All @@ -93,7 +89,6 @@ namespace Core {
ASSERT(err == 0);
}

m_threadName = convertedName;
// If there is no thread, the "new" thread can also not free the destructor,
// then it is up to us.

Expand All @@ -105,10 +100,16 @@ namespace Core {
m_sigExit.SetEvent();
}

std::string convertedName;
if (threadName != nullptr) {
Core::ToString(threadName, convertedName);
}

#ifdef __POSIX__
err = pthread_attr_destroy(&attr);
ASSERT(err == 0);
m_ThreadId = m_hThreadInstance;
m_threadName = convertedName;
#else
if (convertedName.empty() != true) {
ThreadName(convertedName.c_str());
Expand Down

0 comments on commit 7f048da

Please sign in to comment.