diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-09-02 20:01:12 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-09-02 20:01:12 +0300 |
commit | da0bd86739cf7604042a024297f6eb2fbc737e97 (patch) | |
tree | 99419638bcc0cea89a3ae8bf916690f802b01dae /source/blender/gpu/intern | |
parent | 65ad36f5fd71904e776f3deaf77e47b3935ae178 (diff) |
Cleanup: GPU: UniformAttribute: Improve const correctness
Removes a warning and tidy the API.
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r-- | source/blender/gpu/intern/gpu_material.c | 4 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_node_graph.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index d0297127ffc..75066b21e7b 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -225,9 +225,9 @@ ListBase GPU_material_textures(GPUMaterial *material) return material->graph.textures; } -GPUUniformAttrList *GPU_material_uniform_attributes(const GPUMaterial *material) +const GPUUniformAttrList *GPU_material_uniform_attributes(const GPUMaterial *material) { - GPUUniformAttrList *attrs = &material->graph.uniform_attrs; + const GPUUniformAttrList *attrs = &material->graph.uniform_attrs; return attrs->count > 0 ? attrs : NULL; } diff --git a/source/blender/gpu/intern/gpu_node_graph.c b/source/blender/gpu/intern/gpu_node_graph.c index 6d6fad4e80f..4d391ff9063 100644 --- a/source/blender/gpu/intern/gpu_node_graph.c +++ b/source/blender/gpu/intern/gpu_node_graph.c @@ -292,7 +292,7 @@ struct GHash *GPU_uniform_attr_list_hash_new(const char *info) return BLI_ghash_new(uniform_attr_list_hash, uniform_attr_list_cmp, info); } -void GPU_uniform_attr_list_copy(GPUUniformAttrList *dest, GPUUniformAttrList *src) +void GPU_uniform_attr_list_copy(GPUUniformAttrList *dest, const GPUUniformAttrList *src) { dest->count = src->count; dest->hash_code = src->hash_code; |