diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-10-22 07:03:45 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-10-22 08:18:09 +0200 |
commit | df2e6771c5bf6f09e62f9d6b86d83a2631ea365f (patch) | |
tree | 97eef20a43f4b240ecb173b08df3c60c4f8658fb /src/graphics/shader.c | |
parent | faa74e2c942102a9b1aa215a913fddf422714d7e (diff) |
Use const where possible in function params
Diffstat (limited to 'src/graphics/shader.c')
-rw-r--r-- | src/graphics/shader.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |