diff --git a/Include/Aurora/Loop/Loop.hpp b/Include/Aurora/Loop/Loop.hpp index 169258af..b32102be 100644 --- a/Include/Aurora/Loop/Loop.hpp +++ b/Include/Aurora/Loop/Loop.hpp @@ -85,5 +85,4 @@ namespace Aurora::Loop return NewLSOSHandle(reinterpret_cast(handle)); } #endif -} - +} \ No newline at end of file diff --git a/Source/Loop/LSHandle.cpp b/Source/Loop/LSHandle.cpp index 1afed852..57f013b2 100644 --- a/Source/Loop/LSHandle.cpp +++ b/Source/Loop/LSHandle.cpp @@ -16,7 +16,10 @@ namespace Aurora::Loop LSHandle::LSHandle(AuUInt handle) : handle(handle) {} - LSHandle::LSHandle(AuUInt handleRd, AuUInt handleWr) : handle(handleRd), handleWr(handleWr) + LSHandle::LSHandle(AuUInt handleRd, AuUInt handleWr) : handle(handleRd) + #if defined(AURORA_IS_POSIX_DERIVED) + , handleWr(handleWr) + #endif {} bool LSHandle::OnTrigger(AuUInt handle) @@ -73,25 +76,16 @@ namespace Aurora::Loop #if defined(AURORA_IS_POSIX_DERIVED) return this->handle != kInvalidHandle || this->handleWr != kInvalidHandle; #elif defined(AURORA_IS_MODERNNT_DERIVED) - return this->handle != reinterpret_cast(kInvalidHandle); + return this->handle != kInvalidHandle; #endif } AUKN_SYM AuSPtr NewLSOSHandle(AuUInt handle) { - #if defined(AURORA_IS_MODERNNT_DERIVED) - if (reinterpret_cast(handle) == kInvalidHandle) - { - return {}; - } - #endif - - #if defined(AURORA_IS_POSIX_DERIVED) if (handle == kInvalidHandle) { return {}; } - #endif return AuMakeShared(handle); } diff --git a/Source/Loop/LSHandle.hpp b/Source/Loop/LSHandle.hpp index 34c94278..2063c74b 100644 --- a/Source/Loop/LSHandle.hpp +++ b/Source/Loop/LSHandle.hpp @@ -12,7 +12,7 @@ namespace Aurora::Loop { #if defined(AURORA_IS_MODERNNT_DERIVED) - static constexpr auto kInvalidHandle = INVALID_HANDLE_VALUE; + static constexpr auto kInvalidHandle = (AuUInt)INVALID_HANDLE_VALUE; #else static constexpr auto kInvalidHandle = -1; #endif