mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 11:36:10 +00:00
Everywhere: Prefer VERIFY
over assert()
This commit is contained in:
parent
ef9bfe3499
commit
3e43d15440
Notes:
sideshowbarker
2024-07-17 07:09:53 +09:00
Author: https://github.com/DanShaders Commit: https://github.com/SerenityOS/serenity/commit/3e43d15440 Pull-request: https://github.com/SerenityOS/serenity/pull/23074
4 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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++) {
|
||||
|
|
|
@ -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()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue