glsl: Mark _mesa_glsl_parse_state::is_version() as const.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 30 Aug 2013 08:07:37 +0000 (01:07 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 9 Sep 2013 18:46:51 +0000 (11:46 -0700)
This promises the method won't modify the contents of the object.
This allows us to call it even with a const pointer to the state.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/glsl/glsl_parser_extras.h

index 440c15b..c4443ac 100644 (file)
@@ -113,7 +113,7 @@ struct _mesa_glsl_parse_state {
     * feature.
     */
    bool is_version(unsigned required_glsl_version,
-                   unsigned required_glsl_es_version)
+                   unsigned required_glsl_es_version) const
    {
       unsigned required_version = this->es_shader ?
          required_glsl_es_version : required_glsl_version;