glsl: Less const for glsl_type convenience accessors
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 26 Jul 2013 20:37:29 +0000 (13:37 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Sat, 27 Jul 2013 19:13:03 +0000 (12:13 -0700)
The second 'const' says that the pointer itself is constant.  This in
unenforcible in C++, so GCC emits a warning (see) below for each of
these functions in every file that includes glsl_types.h.  It's a lot of
warning spam.

../../../src/glsl/glsl_types.h:176:58: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: mesa-stable@lists.freedesktop.org
src/glsl/glsl_types.cpp
src/glsl/glsl_types.h

index 9d3691b54fe08bcdbd68aa516975e798164009be..8324b8ade7abddaaa9a20a6d0eb328bd6d3ac8b8 100644 (file)
@@ -281,7 +281,7 @@ glsl_type::glsl_type(const glsl_type *array, unsigned length) :
 }
 
 
-const glsl_type *const
+const glsl_type *
 glsl_type::vec(unsigned components)
 {
    if (components == 0 || components > 4)
@@ -294,7 +294,7 @@ glsl_type::vec(unsigned components)
 }
 
 
-const glsl_type *const
+const glsl_type *
 glsl_type::ivec(unsigned components)
 {
    if (components == 0 || components > 4)
@@ -307,7 +307,7 @@ glsl_type::ivec(unsigned components)
 }
 
 
-const glsl_type *const
+const glsl_type *
 glsl_type::uvec(unsigned components)
 {
    if (components == 0 || components > 4)
@@ -320,7 +320,7 @@ glsl_type::uvec(unsigned components)
 }
 
 
-const glsl_type *const
+const glsl_type *
 glsl_type::bvec(unsigned components)
 {
    if (components == 0 || components > 4)
index cb5208029f79cf9c5599624b9e6efe038b88a3d4..8172309a763617f026d0db12c31a89f703562391 100644 (file)
@@ -170,10 +170,10 @@ struct glsl_type {
     * Convenience accessors for vector types (shorter than get_instance()).
     * @{
     */
-   static const glsl_type *const vec(unsigned components);
-   static const glsl_type *const ivec(unsigned components);
-   static const glsl_type *const uvec(unsigned components);
-   static const glsl_type *const bvec(unsigned components);
+   static const glsl_type *vec(unsigned components);
+   static const glsl_type *ivec(unsigned components);
+   static const glsl_type *uvec(unsigned components);
+   static const glsl_type *bvec(unsigned components);
    /**@}*/
 
    /**