mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:24:58 +00:00
Everywhere: Prefer VERIFY
over assert()
This commit is contained in:
parent
ef9bfe3499
commit
3e43d15440
4 changed files with 4 additions and 4 deletions
|
@ -9,7 +9,6 @@
|
||||||
#if defined(KERNEL)
|
#if defined(KERNEL)
|
||||||
# include <Kernel/Library/Assertions.h>
|
# include <Kernel/Library/Assertions.h>
|
||||||
#else
|
#else
|
||||||
# include <assert.h>
|
|
||||||
extern "C" __attribute__((noreturn)) void ak_verification_failed(char const*);
|
extern "C" __attribute__((noreturn)) void ak_verification_failed(char const*);
|
||||||
# define __stringify_helper(x) #x
|
# define __stringify_helper(x) #x
|
||||||
# define __stringify(x) __stringify_helper(x)
|
# define __stringify(x) __stringify_helper(x)
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include <LibJS/Runtime/ValueInlines.h>
|
#include <LibJS/Runtime/ValueInlines.h>
|
||||||
#include <LibJS/Script.h>
|
#include <LibJS/Script.h>
|
||||||
#include <LibJS/SourceTextModule.h>
|
#include <LibJS/SourceTextModule.h>
|
||||||
|
#include <assert.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
|
@ -26,8 +26,8 @@ public:
|
||||||
|
|
||||||
void transform(ReadonlySpan<float> data, Span<float> output)
|
void transform(ReadonlySpan<float> data, Span<float> output)
|
||||||
{
|
{
|
||||||
assert(N == 2 * data.size());
|
VERIFY(N == 2 * data.size());
|
||||||
assert(N == output.size());
|
VERIFY(N == output.size());
|
||||||
for (size_t n = 0; n < N; n++) {
|
for (size_t n = 0; n < N; n++) {
|
||||||
output[n] = 0;
|
output[n] = 0;
|
||||||
for (size_t k = 0; k < N / 2; k++) {
|
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
|
// chains, this function does not call itself recursively. Instead, the recursive
|
||||||
// algorithm is implemented on a provided stack.
|
// algorithm is implemented on a provided stack.
|
||||||
|
|
||||||
assert(stack.is_empty());
|
VERIFY(stack.is_empty());
|
||||||
stack.append(start);
|
stack.append(start);
|
||||||
|
|
||||||
while (!stack.is_empty()) {
|
while (!stack.is_empty()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue