aboutsummaryrefslogtreecommitdiff
path: root/zencore/include
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2021-09-16 11:36:16 +0200
committerMartin Ridgers <[email protected]>2021-09-16 13:19:37 +0200
commit3f5f5f572f367052f8cb30f5545fbb0a459b25b4 (patch)
tree55d855b7354793353755266f81045625b4dc6b1d /zencore/include
parentCorrected Clang/GCC implementations of _Bsr/f (diff)
downloadzen-3f5f5f572f367052f8cb30f5545fbb0a459b25b4.tar.xz
zen-3f5f5f572f367052f8cb30f5545fbb0a459b25b4.zip
Use std::fs::path::value_type instead of wchar_t for path strings
Diffstat (limited to 'zencore/include')
-rw-r--r--zencore/include/zencore/iobuffer.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/zencore/include/zencore/iobuffer.h b/zencore/include/zencore/iobuffer.h
index f8b8217d7..f3120983e 100644
--- a/zencore/include/zencore/iobuffer.h
+++ b/zencore/include/zencore/iobuffer.h
@@ -7,6 +7,8 @@
#include "refcount.h"
#include "zencore.h"
+#include <filesystem>
+
namespace zen {
struct IoBufferExtendedCore;
@@ -341,9 +343,11 @@ private:
class IoBufferBuilder
{
+ using path_char_t = std::filesystem::path::value_type;
+
public:
- ZENCORE_API static IoBuffer MakeFromFile(const wchar_t* FileName, uint64_t Offset = 0, uint64_t Size = ~0ull);
- ZENCORE_API static IoBuffer MakeFromTemporaryFile(const wchar_t* FileName);
+ ZENCORE_API static IoBuffer MakeFromFile(const path_char_t* FileName, uint64_t Offset = 0, uint64_t Size = ~0ull);
+ ZENCORE_API static IoBuffer MakeFromTemporaryFile(const path_char_t* FileName);
ZENCORE_API static IoBuffer MakeFromFileHandle(void* FileHandle, uint64_t Offset = 0, uint64_t Size = ~0ull);
inline static IoBuffer MakeCloneFromMemory(const void* Ptr, size_t Sz) { return IoBuffer(IoBuffer::Clone, Ptr, Sz); }
};