Everywhere: Prefer VERIFY over assert()

This commit is contained in:
Dan Klishch 2023-11-18 15:01:26 -05:00 committed by Tim Flynn
parent ef9bfe3499
commit 3e43d15440
Notes: sideshowbarker 2024-07-17 07:09:53 +09:00
4 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,6 @@
#if defined(KERNEL)
# include <Kernel/Library/Assertions.h>
#else
# include <assert.h>
extern "C" __attribute__((noreturn)) void ak_verification_failed(char const*);
# define __stringify_helper(x) #x
# define __stringify(x) __stringify_helper(x)

View File

@ -23,6 +23,7 @@
#include <LibJS/Runtime/ValueInlines.h>
#include <LibJS/Script.h>
#include <LibJS/SourceTextModule.h>
#include <assert.h>
#include <fcntl.h>
#include <signal.h>
#include <unistd.h>

View File

@ -26,8 +26,8 @@ public:
void transform(ReadonlySpan<float> data, Span<float> output)
{
assert(N == 2 * data.size());
assert(N == output.size());
VERIFY(N == 2 * data.size());
VERIFY(N == output.size());
for (size_t n = 0; n < N; n++) {
output[n] = 0;
for (size_t k = 0; k < N / 2; k++) {

View File

@ -53,7 +53,7 @@ static void prioritize_nodes(Node& start, NodeMap& node_map, NodeStack& stack, b
// chains, this function does not call itself recursively. Instead, the recursive
// algorithm is implemented on a provided stack.
assert(stack.is_empty());
VERIFY(stack.is_empty());
stack.append(start);
while (!stack.is_empty()) {