[*] Update build script
[*] Minor 32bit intrin fix [-] Remove pragma links
This commit is contained in:
parent
4098bd0823
commit
1f825b4754
@ -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"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -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
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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())
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user