mirror of https://github.com/libAthena/athena.git
Merge commit 'ed83'
This commit is contained in:
commit
d13e04cbaf
|
@ -6,8 +6,10 @@ if(NOT CMAKE_CROSSCOMPILING)
|
|||
|
||||
# Force this binary to Release flags (to make MSVC happy)
|
||||
if(MSVC)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MD /O2 /Ob2 /DNDEBUG")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "-debug -incremental:no")
|
||||
endif()
|
||||
|
||||
# Find dependencies
|
||||
|
|
|
@ -60,8 +60,6 @@ private:
|
|||
std::string m_filename;
|
||||
#endif
|
||||
HandleType m_fileHandle;
|
||||
atUint8 m_currentByte;
|
||||
atUint64 m_bytePosition;
|
||||
bool m_globalErr;
|
||||
};
|
||||
|
||||
|
|
11
src/aes.cpp
11
src/aes.cpp
|
@ -7,6 +7,10 @@
|
|||
#include <cpuid.h>
|
||||
#endif
|
||||
|
||||
#if __AES__ || (!defined(__clang__) && _MSC_VER >= 1800)
|
||||
#define _AES_NI 1
|
||||
#endif
|
||||
|
||||
namespace athena
|
||||
{
|
||||
|
||||
|
@ -467,7 +471,7 @@ void SoftwareAES::encrypt(const uint8_t* iv, const uint8_t* inbuf, uint8_t* outb
|
|||
}
|
||||
}
|
||||
|
||||
#if __AES__ || _MSC_VER >= 1800
|
||||
#if _AES_NI
|
||||
|
||||
#include <wmmintrin.h>
|
||||
|
||||
|
@ -582,12 +586,13 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
static int HAS_AES_NI = -1;
|
||||
|
||||
#endif
|
||||
|
||||
static int HAS_AES_NI = -1;
|
||||
std::unique_ptr<IAES> NewAES()
|
||||
{
|
||||
#if __AES__ || _MSC_VER >= 1800
|
||||
#if _AES_NI
|
||||
if (HAS_AES_NI == -1)
|
||||
{
|
||||
#if _MSC_VER
|
||||
|
|
|
@ -5,7 +5,6 @@ namespace athena::io
|
|||
{
|
||||
FileWriter::FileWriter(std::string_view filename, bool overwrite, bool globalErr)
|
||||
: m_fileHandle(0),
|
||||
m_bytePosition(0),
|
||||
m_globalErr(globalErr)
|
||||
{
|
||||
m_filename = utility::utf8ToWide(filename);
|
||||
|
@ -14,7 +13,6 @@ FileWriter::FileWriter(std::string_view filename, bool overwrite, bool globalErr
|
|||
|
||||
FileWriter::FileWriter(std::wstring_view filename, bool overwrite, bool globalErr)
|
||||
: m_fileHandle(0),
|
||||
m_bytePosition(0),
|
||||
m_globalErr(globalErr)
|
||||
{
|
||||
m_filename = filename;
|
||||
|
|
Loading…
Reference in New Issue