From df2e6771c5bf6f09e62f9d6b86d83a2631ea365f Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 22 Oct 2021 07:03:45 +0200 Subject: Use const where possible in function params --- src/graphics/shader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/graphics/shader.c') diff --git a/src/graphics/shader.c b/src/graphics/shader.c index 3d8a204..4aedb87 100644 --- a/src/graphics/shader.c +++ b/src/graphics/shader.c @@ -40,7 +40,7 @@ static void print_compile_log(mgl_context *context, unsigned int shader_id, cons static void mgl_shader_unload(mgl_shader *self); -static int mgl_shader_load_from_memory(mgl_shader *self, unsigned char *shader_data, int shader_size, mgl_shader_type shader_type) { +static int mgl_shader_load_from_memory(mgl_shader *self, const unsigned char *shader_data, int shader_size, mgl_shader_type shader_type) { self->id = 0; self->shader_type = shader_type; @@ -127,7 +127,7 @@ int mgl_shader_program_add_shader_from_file(mgl_shader_program *self, const char return 0; } -int mgl_shader_program_add_shader_from_memory(mgl_shader_program *self, unsigned char *shader_data, int shader_size, mgl_shader_type shader_type){ +int mgl_shader_program_add_shader_from_memory(mgl_shader_program *self, const unsigned char *shader_data, int shader_size, mgl_shader_type shader_type){ mgl_shader shader; if(mgl_shader_load_from_memory(&shader, shader_data, shader_size, shader_type) != 0) return -1; -- cgit v1.2.3