diff options
Diffstat (limited to 'src/common/virtual_buffer.h')
| -rw-r--r-- | src/common/virtual_buffer.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/common/virtual_buffer.h b/src/common/virtual_buffer.h index da064e59e..125cb42f0 100644 --- a/src/common/virtual_buffer.h +++ b/src/common/virtual_buffer.h | |||
| @@ -30,23 +30,23 @@ public: | |||
| 30 | base_ptr = reinterpret_cast<T*>(AllocateMemoryPages(alloc_size)); | 30 | base_ptr = reinterpret_cast<T*>(AllocateMemoryPages(alloc_size)); |
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | constexpr const T& operator[](std::size_t index) const { | 33 | [[nodiscard]] constexpr const T& operator[](std::size_t index) const { |
| 34 | return base_ptr[index]; | 34 | return base_ptr[index]; |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | constexpr T& operator[](std::size_t index) { | 37 | [[nodiscard]] constexpr T& operator[](std::size_t index) { |
| 38 | return base_ptr[index]; | 38 | return base_ptr[index]; |
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | constexpr T* data() { | 41 | [[nodiscard]] constexpr T* data() { |
| 42 | return base_ptr; | 42 | return base_ptr; |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | constexpr const T* data() const { | 45 | [[nodiscard]] constexpr const T* data() const { |
| 46 | return base_ptr; | 46 | return base_ptr; |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | constexpr std::size_t size() const { | 49 | [[nodiscard]] constexpr std::size_t size() const { |
| 50 | return alloc_size / sizeof(T); | 50 | return alloc_size / sizeof(T); |
| 51 | } | 51 | } |
| 52 | 52 | ||