mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:17:35 +00:00
Everywhere: Rename ASSERT => VERIFY
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED) Since all of these checks are done in release builds as well, let's rename them to VERIFY to prevent confusion, as everyone is used to assertions being compiled out in release. We can introduce a new ASSERT macro that is specifically for debug checks, but I'm doing this wholesale conversion first since we've accumulated thousands of these already, and it's not immediately obvious which ones are suitable for ASSERT.
This commit is contained in:
parent
b33a6a443e
commit
5d180d1f99
725 changed files with 3448 additions and 3448 deletions
14
AK/Span.h
14
AK/Span.h
|
@ -140,12 +140,12 @@ public:
|
|||
|
||||
[[nodiscard]] ALWAYS_INLINE constexpr Span slice(size_t start, size_t length) const
|
||||
{
|
||||
ASSERT(start + length <= size());
|
||||
VERIFY(start + length <= size());
|
||||
return { this->m_values + start, length };
|
||||
}
|
||||
[[nodiscard]] ALWAYS_INLINE constexpr Span slice(size_t start) const
|
||||
{
|
||||
ASSERT(start <= size());
|
||||
VERIFY(start <= size());
|
||||
return { this->m_values + start, size() - start };
|
||||
}
|
||||
|
||||
|
@ -156,20 +156,20 @@ public:
|
|||
|
||||
ALWAYS_INLINE constexpr T* offset(size_t start) const
|
||||
{
|
||||
ASSERT(start < this->m_size);
|
||||
VERIFY(start < this->m_size);
|
||||
return this->m_values + start;
|
||||
}
|
||||
|
||||
ALWAYS_INLINE constexpr void overwrite(size_t offset, const void* data, size_t data_size)
|
||||
{
|
||||
// make sure we're not told to write past the end
|
||||
ASSERT(offset + data_size <= size());
|
||||
VERIFY(offset + data_size <= size());
|
||||
__builtin_memcpy(this->data() + offset, data, data_size);
|
||||
}
|
||||
|
||||
ALWAYS_INLINE constexpr size_t copy_to(Span<typename RemoveConst<T>::Type> other) const
|
||||
{
|
||||
ASSERT(other.size() >= size());
|
||||
VERIFY(other.size() >= size());
|
||||
return TypedTransfer<typename RemoveConst<T>::Type>::copy(other.data(), data(), size());
|
||||
}
|
||||
|
||||
|
@ -198,12 +198,12 @@ public:
|
|||
|
||||
ALWAYS_INLINE constexpr const T& at(size_t index) const
|
||||
{
|
||||
ASSERT(index < this->m_size);
|
||||
VERIFY(index < this->m_size);
|
||||
return this->m_values[index];
|
||||
}
|
||||
ALWAYS_INLINE constexpr T& at(size_t index)
|
||||
{
|
||||
ASSERT(index < this->m_size);
|
||||
VERIFY(index < this->m_size);
|
||||
return this->m_values[index];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue