From e948384f562f742a9f479dee074b33802958ba1a Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Mon, 9 Oct 2023 22:48:53 +0200 Subject: minor fixes to zencore (#457) * AssertException constructor should be explicit * removed pragma comment --- src/zencore/crypto.cpp | 5 ----- src/zencore/include/zencore/zencore.h | 2 +- src/zencore/thread.cpp | 2 -- src/zencore/xmake.lua | 2 ++ 4 files changed, 3 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/zencore/crypto.cpp b/src/zencore/crypto.cpp index 448fd36fa..553dafafc 100644 --- a/src/zencore/crypto.cpp +++ b/src/zencore/crypto.cpp @@ -14,11 +14,6 @@ ZEN_THIRD_PARTY_INCLUDES_START #include ZEN_THIRD_PARTY_INCLUDES_END -#if ZEN_PLATFORM_WINDOWS -# pragma comment(lib, "crypt32.lib") -# pragma comment(lib, "ws2_32.lib") -#endif - namespace zen { using namespace std::literals; diff --git a/src/zencore/include/zencore/zencore.h b/src/zencore/include/zencore/zencore.h index 71bd08e69..299fa2c31 100644 --- a/src/zencore/include/zencore/zencore.h +++ b/src/zencore/include/zencore/zencore.h @@ -256,7 +256,7 @@ namespace zen class AssertException : public std::logic_error { public: - AssertException(const char* Msg) : std::logic_error(Msg) {} + inline explicit AssertException(const char* Msg) : std::logic_error(Msg) {} }; struct AssertImpl diff --git a/src/zencore/thread.cpp b/src/zencore/thread.cpp index 33056e4df..e25ef7460 100644 --- a/src/zencore/thread.cpp +++ b/src/zencore/thread.cpp @@ -19,8 +19,6 @@ # include # include # include -# pragma comment(lib, "shell32.lib") -# pragma comment(lib, "user32.lib") #else # include # include diff --git a/src/zencore/xmake.lua b/src/zencore/xmake.lua index 706adff81..37609f0d1 100644 --- a/src/zencore/xmake.lua +++ b/src/zencore/xmake.lua @@ -48,4 +48,6 @@ target('zencore') add_syslinks("Advapi32") add_syslinks("Shell32") add_syslinks("User32") + add_syslinks("crypt32") + add_syslinks("ws2_32") end -- cgit v1.2.3