From 93bba0927f0f1d3be8be472a9f4e7312d0be380d Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sun, 31 Dec 2023 12:26:05 -0800 Subject: libs/din: constify din_t for din() din() just samples the din_t which will always just be a read-only operation, so constify this. It might even help the compiler generate faster code for din-heavy inner loops like modules/swab uses. --- src/libs/din/din.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libs/din/din.h') diff --git a/src/libs/din/din.h b/src/libs/din/din.h index 97823b6..ff25fb4 100644 --- a/src/libs/din/din.h +++ b/src/libs/din/din.h @@ -7,6 +7,6 @@ typedef struct v3f_t v3f_t; din_t * din_new(int width, int height, int depth, unsigned seed); void din_free(din_t *din); void din_randomize(din_t *din); -float din(din_t *din, v3f_t *coordinate); +float din(const din_t *din, v3f_t *coordinate); #endif -- cgit v1.2.1