summaryrefslogtreecommitdiff
path: root/AK
diff options
context:
space:
mode:
authorDaniel Bertalan <dani@danielbertalan.dev>2021-10-09 10:40:46 +0200
committerLinus Groh <mail@linusgroh.de>2021-10-17 17:09:58 +0100
commit9869b598d5033da437ad8896214c6feae486cf64 (patch)
treee3cb13757fea9667a90768c5a05f0bda259b08bb /AK
parentc524f5829050c94d5bc286e8a7994b7be0ce2de9 (diff)
downloadserenity-9869b598d5033da437ad8896214c6feae486cf64.zip
AK: Make Span trivially copy-constructible
There is no need to have a user-defined copy constructor that simply calls the base class's copy constructor. By having the compiler generate it for us, Span is made trivially copyable, so it can be passed in registers.
Diffstat (limited to 'AK')
-rw-r--r--AK/Span.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/AK/Span.h b/AK/Span.h
index 017f8947bf..2de4af8da5 100644
--- a/AK/Span.h
+++ b/AK/Span.h
@@ -94,11 +94,6 @@ public:
constexpr Span() = default;
- ALWAYS_INLINE constexpr Span(Span const& other)
- : Span(other.m_values, other.m_size)
- {
- }
-
[[nodiscard]] ALWAYS_INLINE constexpr T const* data() const { return this->m_values; }
[[nodiscard]] ALWAYS_INLINE constexpr T* data() { return this->m_values; }
@@ -211,13 +206,6 @@ public:
return at(index);
}
- ALWAYS_INLINE constexpr Span& operator=(Span<T> const& other)
- {
- this->m_size = other.m_size;
- this->m_values = other.m_values;
- return *this;
- }
-
constexpr bool operator==(Span const& other) const
{
if (size() != other.size())