aboutsummaryrefslogtreecommitdiff
path: root/zencore/include
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2022-06-11 23:22:00 +0200
committerStefan Boberg <[email protected]>2022-06-11 23:22:00 +0200
commit348ae50c946b541ce935703045ab98a49d809ed4 (patch)
treea400285c9e5ae215dc7ef3b2958ce922f48ec7bc /zencore/include
parentfixed mac build ("unused" variable) (diff)
parentclang-format fix (diff)
downloadzen-348ae50c946b541ce935703045ab98a49d809ed4.tar.xz
zen-348ae50c946b541ce935703045ab98a49d809ed4.zip
Merge branch 'main' of https://github.com/EpicGames/zen
Diffstat (limited to 'zencore/include')
-rw-r--r--zencore/include/zencore/filesystem.h1
-rw-r--r--zencore/include/zencore/iobuffer.h6
-rw-r--r--zencore/include/zencore/string.h2
3 files changed, 8 insertions, 1 deletions
diff --git a/zencore/include/zencore/filesystem.h b/zencore/include/zencore/filesystem.h
index 6d07a79b4..f49135687 100644
--- a/zencore/include/zencore/filesystem.h
+++ b/zencore/include/zencore/filesystem.h
@@ -46,6 +46,7 @@ struct FileContents
IoBuffer Flatten();
};
+ZENCORE_API FileContents ReadStdIn();
ZENCORE_API FileContents ReadFile(std::filesystem::path Path);
ZENCORE_API bool ScanFile(std::filesystem::path Path, uint64_t ChunkSize, std::function<void(const void* Data, size_t Size)>&& ProcessFunc);
ZENCORE_API void WriteFile(std::filesystem::path Path, const IoBuffer* const* Data, size_t BufferCount);
diff --git a/zencore/include/zencore/iobuffer.h b/zencore/include/zencore/iobuffer.h
index bf658922d..b38201ba3 100644
--- a/zencore/include/zencore/iobuffer.h
+++ b/zencore/include/zencore/iobuffer.h
@@ -390,6 +390,12 @@ public:
return reinterpret_cast<const T*>(m_Core->DataPointer());
}
+ template<typename T>
+ [[nodiscard]] T* MutableData() const
+ {
+ return reinterpret_cast<T*>(m_Core->MutableDataPointer());
+ }
+
private:
RefPtr<IoBufferCore> m_Core = new IoBufferCore;
diff --git a/zencore/include/zencore/string.h b/zencore/include/zencore/string.h
index 92f567dae..7ea8c029f 100644
--- a/zencore/include/zencore/string.h
+++ b/zencore/include/zencore/string.h
@@ -933,7 +933,7 @@ public:
return *Skip(Str, Set) == '\0';
}
- ////////// Algorithms for string types like FStringView and FString //////////
+ ////////// Algorithms for string types like std::string_view and std::string //////////
/** Get initial substring with all characters in set */
template<class StringType>