nir: cleanup glsl_get_struct_field_offset, glsl_get_explicit_stride
authorTapani Pälli <tapani.palli@intel.com>
Tue, 22 Jan 2019 07:37:58 +0000 (09:37 +0200)
committerTapani Pälli <tapani.palli@intel.com>
Tue, 22 Jan 2019 11:09:15 +0000 (13:09 +0200)
Take away const qualifier from return type of these functions as
-Wignored-qualifiers points out it is ignored for these cases.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/compiler/nir_types.cpp
src/compiler/nir_types.h

index 356252276b4a9ac0d093ec1a6011d052fd62a950..7ea5ef9b83101303ccfb5e6582bf9b0890996991 100644 (file)
@@ -71,14 +71,14 @@ glsl_get_struct_field(const glsl_type *type, unsigned index)
    return type->fields.structure[index].type;
 }
 
-const int
+int
 glsl_get_struct_field_offset(const struct glsl_type *type,
                              unsigned index)
 {
    return type->fields.structure[index].offset;
 }
 
-const unsigned
+unsigned
 glsl_get_explicit_stride(const struct glsl_type *type)
 {
    return type->explicit_stride;
index d17671b940000a8ff7ba0f79662cd9569dce396f..15891ce43be7776cb5a6ad35e62c5e83c2c6b5d0 100644 (file)
@@ -46,10 +46,10 @@ const char *glsl_get_type_name(const struct glsl_type *type);
 const struct glsl_type *glsl_get_struct_field(const struct glsl_type *type,
                                               unsigned index);
 
-const int glsl_get_struct_field_offset(const struct glsl_type *type,
-                                       unsigned index);
+int glsl_get_struct_field_offset(const struct glsl_type *type,
+                                 unsigned index);
 
-const unsigned glsl_get_explicit_stride(const struct glsl_type *type);
+unsigned glsl_get_explicit_stride(const struct glsl_type *type);
 const struct glsl_type *glsl_get_array_element(const struct glsl_type *type);
 const struct glsl_type *glsl_without_array(const struct glsl_type *type);
 const struct glsl_type *glsl_without_array_or_matrix(const struct glsl_type *type);