1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:57:35 +00:00

LibTLS+LibCrypto: Replace a whole bunch of ByteBuffers with Spans

This commit is contained in:
Andreas Kling 2020-12-19 15:07:09 +01:00
parent 4d89c1885d
commit 8e20208dd6
22 changed files with 116 additions and 109 deletions

View file

@ -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