AK: Don't use east-constexpr in Span methods

This commit is contained in:
Timothy Flynn 2024-03-14 12:42:18 -04:00 committed by Andreas Kling
parent 0994aa91dc
commit faf4ba63c2
Notes: sideshowbarker 2024-07-17 23:00:03 +09:00

View file

@ -210,7 +210,7 @@ public:
return size();
}
[[nodiscard]] bool constexpr contains_slow(T const& value) const
[[nodiscard]] constexpr bool contains_slow(T const& value) const
{
for (size_t i = 0; i < size(); ++i) {
if (at(i) == value)
@ -219,7 +219,7 @@ public:
return false;
}
[[nodiscard]] bool constexpr starts_with(ReadonlySpan<T> other) const
[[nodiscard]] constexpr bool starts_with(ReadonlySpan<T> other) const
{
if (size() < other.size())
return false;
@ -227,7 +227,7 @@ public:
return TypedTransfer<T>::compare(data(), other.data(), other.size());
}
[[nodiscard]] size_t constexpr matching_prefix_length(ReadonlySpan<T> other) const
[[nodiscard]] constexpr size_t matching_prefix_length(ReadonlySpan<T> other) const
{
auto maximum_length = min(size(), other.size());