[*] Update build script

[*] Minor 32bit intrin fix
[-] Remove pragma links
This commit is contained in:
Reece Wilson 2022-01-20 13:27:45 +00:00
parent 4098bd0823
commit 1f825b4754
6 changed files with 8 additions and 10 deletions

View File

@ -15,7 +15,7 @@
{ {
"filter": {"platforms": "win32"}, "filter": {"platforms": "win32"},
"then": { "then": {
"links": ["Bcrypt.lib", "UxTheme.lib", "Aux_ulib.lib"] "links": ["Bcrypt.lib", "UxTheme.lib", "Aux_ulib.lib", "Dbghelp.lib", "ws2_32.lib"]
} }
} }
] ]

View File

@ -49,7 +49,7 @@
#define AUKN_INTERFACE AUI_INTERFACE_IMPL #define AUKN_INTERFACE AUI_INTERFACE_IMPL
#else #else
#define AUKN_INTERFACE AUI_INTERFACE_FWD #define AUKN_INTERFACE AUI_INTERFACE_FWD
#endif #endif
#include "Memory/Memory.hpp" #include "Memory/Memory.hpp"

View File

@ -701,7 +701,7 @@ static auline bool AuBitScanForward(AuUInt8 &index, T value)
#if defined(AURORA_IS_32BIT) #if defined(AURORA_IS_32BIT)
if (!_BitScanForward(&ret, static_cast<AuUInt32>(value & 0xffffffff))) if (!_BitScanForward(&ret, static_cast<AuUInt32>(value & 0xffffffff)))
{ {
_BitScanForward(&ret, static_cast<AuUInt32>((value << 32) & 0xffffffff)); _BitScanForward(&ret, static_cast<AuUInt32>((value >> 32) & 0xffffffff));
ret += 32; ret += 32;
} }
#else #else
@ -714,7 +714,7 @@ static auline bool AuBitScanForward(AuUInt8 &index, T value)
auto lower = static_cast<AuUInt32>(value & 0xffffffff)); auto lower = static_cast<AuUInt32>(value & 0xffffffff));
if (lower == 0) if (lower == 0)
{ {
ret = __builtin_ctzl(static_cast<AuUInt32>((value << 32) & 0xffffffff)); ret = __builtin_ctzl(static_cast<AuUInt32>((value >> 32) & 0xffffffff));
ret += 32; ret += 32;
} }
else else

View File

@ -16,8 +16,6 @@
#include <Dbghelp.h> #include <Dbghelp.h>
#include <codecvt> #include <codecvt>
#pragma comment(lib,"Dbghelp.lib")
#include <vcruntime_exception.h> #include <vcruntime_exception.h>
#include <ehdata.h> #include <ehdata.h>

View File

@ -14,7 +14,7 @@ namespace Aurora::Locale::Encoding
AUKN_SYM BOM DecodeBOM(const Memory::MemoryViewRead & binary) AUKN_SYM BOM DecodeBOM(const Memory::MemoryViewRead & binary)
{ {
#define ADD_PATTERN(str, code) {str, {ECodePage::code, AuArraySize(str) - 1}} #define ADD_PATTERN(str, code) {str, {ECodePage::code, AuArraySize(str) - 1}}
AuList<std::tuple<const char *, BOM>> bows = AuList<AuTuple<const char *, BOM>> bows =
{ {
ADD_PATTERN("\xFF\xFE\x00\x00", eUTF32), ADD_PATTERN("\xFF\xFE\x00\x00", eUTF32),
ADD_PATTERN("\x00\x00\xFE\xFF", eUTF32BE), ADD_PATTERN("\x00\x00\xFE\xFF", eUTF32BE),
@ -33,7 +33,7 @@ namespace Aurora::Locale::Encoding
for (const auto &[string, bom] : bows) for (const auto &[string, bom] : bows)
{ {
if (binary.length < bom.length) continue; if (binary.length < bom.length) continue;
if (std::memcmp(binary.ptr, string, bom.length) != 0) continue; if (AuMemcmp(binary.ptr, string, bom.length) != 0) continue;
return bom; return bom;
} }

View File

@ -205,7 +205,7 @@ namespace Aurora::Parse
} }
template<typename Func, typename Res> template<typename Func, typename Res>
static bool ScrewExceptions_2(Func func, const std::string &in, Res &out) static bool ScrewExceptions_2(Func func, const AuString &in, Res &out)
{ {
try try
{ {
@ -232,7 +232,7 @@ namespace Aurora::Parse
auto itr = in.begin(); auto itr = in.begin();
if constexpr (std::is_same<T, AuSInt>::value) if constexpr (AuIsSame_v<T, AuSInt>)
{ {
if (itr != in.end()) if (itr != in.end())
{ {