aboutsummaryrefslogtreecommitdiff
path: root/zencore
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2022-03-16 14:58:34 +0100
committerMartin Ridgers <[email protected]>2022-03-16 14:58:34 +0100
commitef2f48fbfa3dc5d7a61baf6ccfd6e41b6c3eb895 (patch)
tree2afa4ea4993869a10e37baa6062f8f4f3eca91f0 /zencore
parentCorrected linux install (diff)
parentFixed typo (diff)
downloadzen-ef2f48fbfa3dc5d7a61baf6ccfd6e41b6c3eb895.tar.xz
zen-ef2f48fbfa3dc5d7a61baf6ccfd6e41b6c3eb895.zip
Merge branch 'dashboard-zipfs'
Diffstat (limited to 'zencore')
-rw-r--r--zencore/include/zencore/iobuffer.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/zencore/include/zencore/iobuffer.h b/zencore/include/zencore/iobuffer.h
index 5dbbb95bf..449236127 100644
--- a/zencore/include/zencore/iobuffer.h
+++ b/zencore/include/zencore/iobuffer.h
@@ -27,6 +27,10 @@ enum class ZenContentType : uint8_t
kCompressedBinary = 7,
kUnknownContentType = 8,
kHTML = 9,
+ kJavaScript = 10,
+ kCSS = 11,
+ kPNG = 12,
+ kIcon = 13,
kCOUNT
};
@@ -58,6 +62,15 @@ ToString(ZenContentType ContentType)
return "yaml"sv;
case ZenContentType::kHTML:
return "html"sv;
+ case ZenContentType::kJavaScript:
+ return "javascript"sv;
+ case ZenContentType::kCSS:
+ return "css"sv;
+ case ZenContentType::kPNG:
+ return "png"sv;
+ case ZenContentType::kIcon:
+ return "icon"sv;
+
}
}
@@ -336,7 +349,7 @@ public:
/** Create a buffer which references a sequence of bytes inside another buffer
*/
- ZENCORE_API IoBuffer(const IoBuffer& OuterBuffer, size_t Offset, size_t SizeBytes);
+ ZENCORE_API IoBuffer(const IoBuffer& OuterBuffer, size_t Offset, size_t SizeBytes=~0ull);
/** Create a buffer which references a range of bytes which we assume will live
* for the entire life time.
@@ -351,7 +364,7 @@ public:
ZENCORE_API IoBuffer(EFileTag, void* FileHandle, uint64_t ChunkFileOffset, uint64_t ChunkSize);
ZENCORE_API IoBuffer(EBorrowedFileTag, void* FileHandle, uint64_t ChunkFileOffset, uint64_t ChunkSize);
- inline operator bool() const { return !m_Core->IsNull(); }
+ inline explicit operator bool() const { return !m_Core->IsNull(); }
inline operator MemoryView() const& { return MemoryView(m_Core->DataPointer(), m_Core->DataBytes()); }
inline void MakeOwned() { return m_Core->MakeOwned(); }
[[nodiscard]] inline bool IsOwned() const { return m_Core->IsOwned(); }