diff --git a/src/Build.cmd b/src/Build.cmd index b05dbeb..0e49347 100644 --- a/src/Build.cmd +++ b/src/Build.cmd @@ -26,7 +26,7 @@ goto:eof :BuildObj echo BuildObj %1 %2 %3 -cl /O1 /Os /Oi /GS- /std:c++17 /execution-charset:utf-8 /Zc:threadSafeInit- /Zc:sizedDealloc- /Zc:tlsGuards- /Zc:alignedNew- /arch:IA32 /Z7 /MT /Fo"objs\\%Platform%\\%1" /Zl /c /D "NDEBUG" /D "YY_Thunks_Target=%2" "%~dp0Thunks\YY_Thunks.cpp" +cl /O1 /Os /Oi /GS- /std:c++17 /execution-charset:utf-8 /Zc:sizedDealloc- /Zc:tlsGuards- /Zc:alignedNew- /arch:IA32 /Z7 /MT /Fo"objs\\%Platform%\\%1" /Zl /c /D "NDEBUG" /D "YY_Thunks_Target=%2" "%~dp0Thunks\YY_Thunks.cpp" if %ErrorLevel% NEQ 0 exit /b %ErrorLevel% ::生成weak符号,一些非必须符号安排为weak可以避免链接失败 @@ -52,7 +52,7 @@ echo BuildLib %1 %2 %3 md "Lib\\%1\\%Platform%" -cl /O1 /Os /Oi /GS- /std:c++17 /execution-charset:utf-8 /Zc:threadSafeInit- /Zc:sizedDealloc- /Zc:tlsGuards- /Zc:alignedNew- /arch:IA32 /Z7 /MT /Fo"Lib\\%1\\%Platform%\\YY_Thunks_for_%1.obj" /Zl /c /D "__APPLY_CHROMIUM_WORKAROUNDS" /D "__USING_NTDLL_LIB" /D "NDEBUG" /D "YY_Thunks_Target=%2" /D "__FALLBACK_PREFIX=YY_Thunks_" "%~dp0Thunks\YY_Thunks.cpp" +cl /O1 /Os /Oi /GS- /std:c++17 /execution-charset:utf-8 /Zc:sizedDealloc- /Zc:tlsGuards- /Zc:alignedNew- /arch:IA32 /Z7 /MT /Fo"Lib\\%1\\%Platform%\\YY_Thunks_for_%1.obj" /Zl /c /D "__APPLY_CHROMIUM_WORKAROUNDS" /D "__USING_NTDLL_LIB" /D "NDEBUG" /D "YY_Thunks_Target=%2" /D "__FALLBACK_PREFIX=YY_Thunks_" "%~dp0Thunks\YY_Thunks.cpp" if %ErrorLevel% NEQ 0 exit /b %ErrorLevel% diff --git a/src/Thunks/YY_Thunks.cpp b/src/Thunks/YY_Thunks.cpp index c85d2f4..7b2f9b4 100644 --- a/src/Thunks/YY_Thunks.cpp +++ b/src/Thunks/YY_Thunks.cpp @@ -437,7 +437,7 @@ namespace YY::Thunks::internal void* __CRTDECL operator new( size_t _Size, void* _Block - ) + ) noexcept { return _Block; } @@ -487,6 +487,13 @@ namespace YY::Thunks::internal { Free(_Block); } + + void __CRTDECL operator delete( + void* _Block, + void* + ) noexcept + { + } }; diff --git a/src/Thunks/api-ms-win-core-threadpool.hpp b/src/Thunks/api-ms-win-core-threadpool.hpp index f947b1e..db88c49 100644 --- a/src/Thunks/api-ms-win-core-threadpool.hpp +++ b/src/Thunks/api-ms-win-core-threadpool.hpp @@ -344,7 +344,7 @@ namespace YY::Thunks::Fallback static_assert(sizeof(TaskRunnerFlags) == sizeof(uint64_t)); public: - TP_Pool(bool _bDefault = false) + constexpr TP_Pool(bool _bDefault = false) : uRef(_bDefault ? UINT32_MAX : 1) { }