summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_parser_extras.cpp
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2014-01-23 23:22:01 +1100
committerTimothy Arceri <[email protected]>2014-01-23 23:37:37 +1100
commitb0c64d3cc6d1d3a64c86a5b2cd748b4178bff350 (patch)
tree71b1f532d7cbcca9f829cbc9891a08735800f9c6 /src/glsl/glsl_parser_extras.cpp
parent61a584609936940f69207dd520b5b4208810a9e7 (diff)
glsl: remove remaining is_array variables
Previously the reason we needed is_array was because we used array_size == NULL to represent both non-arrays and unsized arrays. Now that we use a non-NULL array_specifier to represent an unsized array, is_array is redundant. Signed-off-by: Timothy Arceri <[email protected]> Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/glsl/glsl_parser_extras.cpp')
-rw-r--r--src/glsl/glsl_parser_extras.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index ceb42b61722..ba1c969724d 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -790,12 +790,10 @@ ast_node::ast_node(void)
static void
-ast_opt_array_dimensions_print(bool is_array, const ast_array_specifier *array_specifier)
+ast_opt_array_dimensions_print(const ast_array_specifier *array_specifier)
{
- if (is_array) {
- if (array_specifier)
- array_specifier->print();
- }
+ if (array_specifier)
+ array_specifier->print();
}
@@ -1018,7 +1016,7 @@ ast_parameter_declarator::print(void) const
type->print();
if (identifier)
printf("%s ", identifier);
- ast_opt_array_dimensions_print(is_array, array_specifier);
+ ast_opt_array_dimensions_print(array_specifier);
}
@@ -1034,7 +1032,7 @@ void
ast_declaration::print(void) const
{
printf("%s ", identifier);
- ast_opt_array_dimensions_print(is_array, array_specifier);
+ ast_opt_array_dimensions_print(array_specifier);
if (initializer) {
printf("= ");
@@ -1043,12 +1041,11 @@ ast_declaration::print(void) const
}
-ast_declaration::ast_declaration(const char *identifier, bool is_array,
+ast_declaration::ast_declaration(const char *identifier,
ast_array_specifier *array_specifier,
ast_expression *initializer)
{
this->identifier = identifier;
- this->is_array = is_array;
this->array_specifier = array_specifier;
this->initializer = initializer;
}