From 17272e60fa2017b952b9c92d2dedeb31f1fdfb05 Mon Sep 17 00:00:00 2001 From: ArtemisX64 Date: Fri, 26 Aug 2022 18:14:34 +0900 Subject: [PATCH] Replace __WIN32 with __clang__ --- dependencies/ih264d/decoder/x86/ih264d_function_selector.c | 2 +- src/Cafe/Account/Account.cpp | 2 +- src/Cemu/nex/prudp.cpp | 4 ++-- src/util/helpers/helpers.cpp | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dependencies/ih264d/decoder/x86/ih264d_function_selector.c b/dependencies/ih264d/decoder/x86/ih264d_function_selector.c index 3bcd7efe..8b4b0ca3 100644 --- a/dependencies/ih264d/decoder/x86/ih264d_function_selector.c +++ b/dependencies/ih264d/decoder/x86/ih264d_function_selector.c @@ -77,7 +77,7 @@ void ih264d_init_function_ptr(dec_struct_t *ps_codec) } } -#ifndef __WIN32 +#ifdef __clang__ #include void __cpuid2(signed int* cpuInfo, unsigned int level) diff --git a/src/Cafe/Account/Account.cpp b/src/Cafe/Account/Account.cpp index 0cbcdb0f..59e83bb8 100644 --- a/src/Cafe/Account/Account.cpp +++ b/src/Cafe/Account/Account.cpp @@ -72,7 +72,7 @@ Account::Account(uint32 persistent_id, std::wstring_view mii_name) //Use boost library to escape static asserts in Linux Builds //TODO: Look for fix in libstdc++ - #ifndef __WIN32 + #ifdef __clang__ boost::random::uniform_int_distribution dist(std::numeric_limits::min(), std::numeric_limits::max()); #else std::uniform_int_distribution dist(std::numeric_limits::min(), std::numeric_limits::max()); diff --git a/src/Cemu/nex/prudp.cpp b/src/Cemu/nex/prudp.cpp index 69a55343..52d77d5a 100644 --- a/src/Cemu/nex/prudp.cpp +++ b/src/Cemu/nex/prudp.cpp @@ -4,7 +4,7 @@ #include #include -#ifndef __WIN32 +#ifdef __clang__ #include #endif @@ -117,7 +117,7 @@ void releasePRUDPPort(uint16 port) std::mt19937_64 prudpRG(GetTickCount()); //Workaround for static asserts when using uniform_int_distribution //TODO: Look for fix in libstdc++ -#ifdef __WIN32 +#ifndef __clang__ std::uniform_int_distribution prudpDis8(0, 0xFF); #else boost::random::uniform_int_distribution prudpDis8(0, 0xFF); diff --git a/src/util/helpers/helpers.cpp b/src/util/helpers/helpers.cpp index 249a37f7..f51da1a7 100644 --- a/src/util/helpers/helpers.cpp +++ b/src/util/helpers/helpers.cpp @@ -9,7 +9,7 @@ #include "config/ActiveSettings.h" -#ifndef __WIN32 +#ifdef __clang__ #include #endif @@ -433,7 +433,7 @@ std::string GenerateRandomString(size_t length, std::string_view characters) std::mt19937 gen(rd()); //Workaround for static asserts using boost //TODO: Wait for fix in libstdc++ - #ifdef __WIN32 + #ifndef __clang__ std::uniform_int_distribution index_dist(0, characters.size() - 1); #else boost::random::uniform_int_distribution index_dist(0, characters.size() - 1);