diff options
author | Andreas Kling <kling@serenityos.org> | 2020-12-19 15:07:09 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-12-19 18:29:13 +0100 |
commit | 8e20208dd6d561f0891fd424d8c396c28247cff9 (patch) | |
tree | 633790ef5fca4c9a55e6e6805a54ab63b6e14ca1 /AK/Span.h | |
parent | 4d89c1885df4734c8b5cd61e1fd942dda24c3077 (diff) | |
download | serenity-8e20208dd6d561f0891fd424d8c396c28247cff9.zip |
LibTLS+LibCrypto: Replace a whole bunch of ByteBuffers with Spans
Diffstat (limited to 'AK/Span.h')
-rw-r--r-- | AK/Span.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -118,6 +118,9 @@ public: ALWAYS_INLINE constexpr const T* data() const { return this->m_values; } ALWAYS_INLINE constexpr T* data() { return this->m_values; } + ALWAYS_INLINE constexpr const T* offset_pointer(size_t offset) const { return this->m_values + offset; } + ALWAYS_INLINE constexpr T* offset_pointer(size_t offset) { return this->m_values + offset; } + using ConstIterator = SimpleIterator<const Span, const T>; using Iterator = SimpleIterator<Span, T>; @@ -128,7 +131,7 @@ public: constexpr Iterator end() { return Iterator::end(*this); } ALWAYS_INLINE constexpr size_t size() const { return this->m_size; } - + ALWAYS_INLINE constexpr bool is_null() const { return this->m_values == nullptr; } ALWAYS_INLINE constexpr bool is_empty() const { return this->m_size == 0; } ALWAYS_INLINE constexpr Span slice(size_t start, size_t length) const |