Replace assert with assume for release build optimization (#1390)

This commit is contained in:
Sylvie
2024-04-02 11:09:31 -04:00
committed by GitHub
parent 1d39e5ed56
commit a234da42a6
26 changed files with 158 additions and 147 deletions

View File

@@ -3,7 +3,6 @@
#include "gfx/pal_sorting.hpp"
#include <algorithm>
#include <assert.h>
#include "helpers.hpp"
@@ -55,7 +54,7 @@ void grayscale(
// This method is only applicable if there are at most as many colors as colors per palette, so
// we should only have a single palette.
assert(palettes.size() == 1);
assume(palettes.size() == 1);
Palette &palette = palettes[0];
std::fill(RANGE(palette.colors), Rgba::transparent);