Merge pull request #63 from lioncash/windows

CMakeLists: Define -DNOMINMAX and -DWIN32_LEAN_AND_MEAN on Windows
This commit is contained in:
Phillip Stephens 2019-09-08 00:12:59 -07:00 committed by GitHub
commit 925fee31c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 6 deletions

View File

@ -74,6 +74,11 @@ if(WIN32)
src/athena/FileWriterWin32.cpp
src/athena/FileReaderWin32.cpp
)
target_compile_definitions(athena-core PRIVATE
-DNOMINMAX
-DWIN32_LEAN_AND_MEAN
)
else()
target_sources(athena-core PRIVATE
src/athena/FileWriterNix.cpp

View File

@ -3,9 +3,6 @@
#include <algorithm>
#include <limits>
#undef min
#undef max
namespace athena::io {
FileWriter::FileWriter(std::string_view filename, bool overwrite, bool globalErr)
: m_fileHandle(0), m_globalErr(globalErr) {

View File

@ -8,9 +8,6 @@
#include <malloc.h>
#endif // HW_RVL
#undef min
#undef max
namespace athena::io {
MemoryReader::MemoryReader(const void* data, atUint64 length, bool takeOwnership, bool globalErr)
: m_data(data), m_length(length), m_position(0), m_owns(takeOwnership), m_globalErr(globalErr) {