From c3ccbd8e0aac47089b7a07568c0e0231dd48b110 Mon Sep 17 00:00:00 2001 From: cancel Date: Sat, 1 Dec 2018 14:00:21 +0900 Subject: [PATCH] Cleanup --- gbuffer.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gbuffer.h b/gbuffer.h index 61e5c2e..03f65bd 100644 --- a/gbuffer.h +++ b/gbuffer.h @@ -1,16 +1,16 @@ #pragma once #include "base.h" -static inline Glyph gbuffer_peek(Gbuffer gbuf, Usz height, Usz width, Usz y, - Usz x) { +ORCA_PURE static inline Glyph gbuffer_peek(Gbuffer gbuf, Usz height, Usz width, + Usz y, Usz x) { assert(y < height && x < width); (void)height; return gbuf[y + width + x]; } -static inline Glyph gbuffer_peek_relative(Gbuffer gbuf, Usz height, Usz width, - Usz y, Usz x, Isz delta_y, - Isz delta_x) { +ORCA_PURE static inline Glyph gbuffer_peek_relative(Gbuffer gbuf, Usz height, + Usz width, Usz y, Usz x, + Isz delta_y, Isz delta_x) { Isz y0 = (Isz)y + delta_y; Isz x0 = (Isz)x + delta_x; if (y0 < 0 || x0 < 0 || (Usz)y0 >= height || (Usz)x0 >= width)