From dbc66788a680daf3f8a1c0c6e7fbd1b77cc06864 Mon Sep 17 00:00:00 2001 From: Spartan322 Date: Sat, 2 Sep 2023 09:03:14 -0400 Subject: Add github actions and workflow --- src/openvic-dataloader/detail/BasicBufferHandler.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/openvic-dataloader/detail') diff --git a/src/openvic-dataloader/detail/BasicBufferHandler.hpp b/src/openvic-dataloader/detail/BasicBufferHandler.hpp index ba2cef9..75ea8ee 100644 --- a/src/openvic-dataloader/detail/BasicBufferHandler.hpp +++ b/src/openvic-dataloader/detail/BasicBufferHandler.hpp @@ -3,6 +3,7 @@ #include #include +#include #include #include @@ -14,16 +15,16 @@ namespace ovdl::detail { template class BasicBufferHandler { public: - constexpr bool is_valid() const { + OVDL_OPTIONAL_CONSTEXPR bool is_valid() const { return _buffer.size() != 0; } - constexpr std::optional load_buffer_size(const char* data, std::size_t size) { + OVDL_OPTIONAL_CONSTEXPR std::optional load_buffer_size(const char* data, std::size_t size) { _buffer = lexy::buffer(data, size); return std::nullopt; } - constexpr std::optional load_buffer(const char* start, const char* end) { + OVDL_OPTIONAL_CONSTEXPR std::optional load_buffer(const char* start, const char* end) { _buffer = lexy::buffer(start, end); return std::nullopt; } -- cgit v1.2.3-56-ga3b1