mirror of https://github.com/libAthena/athena.git
FileReader/Writer: Refactor to remove <Windows.h> include
This commit is contained in:
parent
e13b498266
commit
f27a63f312
|
@ -1,14 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#if _WIN32
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <cstdio>
|
||||
#endif
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
|
@ -49,7 +41,7 @@ public:
|
|||
void setCacheSize(const atInt32 blockSize);
|
||||
|
||||
#if _WIN32
|
||||
using HandleType = HANDLE;
|
||||
using HandleType = void*;
|
||||
#else
|
||||
using HandleType = FILE*;
|
||||
#endif
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <cstdio>
|
||||
#endif
|
||||
|
||||
#include "athena/IStreamWriter.hpp"
|
||||
#include "athena/Types.hpp"
|
||||
|
@ -43,7 +36,7 @@ public:
|
|||
void writeUBytes(const atUint8* data, atUint64 len) override;
|
||||
|
||||
#ifdef _WIN32
|
||||
using HandleType = HANDLE;
|
||||
using HandleType = void*;
|
||||
#else
|
||||
using HandleType = FILE*;
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
#include "athena/FileReader.hpp"
|
||||
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
#include <windows.h>
|
||||
|
||||
#include "win32_largefilewrapper.h"
|
||||
|
||||
namespace athena::io {
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#include "athena/FileWriter.hpp"
|
||||
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
|
||||
|
|
Loading…
Reference in New Issue