ref: 4dc405c85c202744355350de7c5bf7b029fe78c0
parent: e5906658cd621b1ccc52024e024fce6cb173da89
author: cancel <cancel@cancel.fm>
date: Tue Nov 27 15:33:48 EST 2018
Fix Mac build Not sure why I'm getting a linker error with these not marked as static. Should investigate.
--- a/gbuffer.h
+++ b/gbuffer.h
@@ -1,14 +1,16 @@
#pragma once
#include "base.h"
-inline Glyph gbuffer_peek(Gbuffer gbuf, Usz height, Usz width, Usz y, Usz x) {
+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];
}
-inline Glyph gbuffer_peek_relative(Gbuffer gbuf, Usz height, Usz width, Usz y,
- Usz x, Isz delta_y, Isz delta_x) {
+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)
@@ -16,15 +18,16 @@
return gbuf[(Usz)y0 * width + (Usz)x0];
}
-inline void gbuffer_poke(Gbuffer gbuf, Usz height, Usz width, Usz y, Usz x,
- Glyph g) {
+static inline void gbuffer_poke(Gbuffer gbuf, Usz height, Usz width, Usz y,
+ Usz x, Glyph g) {
assert(y < height && x < width);
(void)height;
gbuf[y * width + x] = g;
}
-inline void gbuffer_poke_relative(Gbuffer gbuf, Usz height, Usz width, Usz y,
- Usz x, Isz delta_y, Isz delta_x, Glyph g) {
+static inline void gbuffer_poke_relative(Gbuffer gbuf, Usz height, Usz width,
+ Usz y, Usz x, Isz delta_y, Isz delta_x,
+ Glyph g) {
Isz y0 = (Isz)y + delta_y;
Isz x0 = (Isz)x + delta_x;
if (y0 < 0 || x0 < 0 || (Usz)y0 >= height || (Usz)x0 >= width)