summaryrefslogtreecommitdiffstats
path: root/src/glsl/pp/sl_pp_version.c
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2009-09-17 12:12:34 +0200
committerMichal Krol <[email protected]>2009-09-17 12:12:34 +0200
commitce8f486156f5c4b28b51954ea862675275c38f6d (patch)
tree246d6a675c01d4350de0f8cd8d8622ea60311713 /src/glsl/pp/sl_pp_version.c
parent0ddf41d34d511b339e0bb5a59673765f1bf0b3a5 (diff)
slang/pp: Use a dictionary for the remaining string literals.
Diffstat (limited to 'src/glsl/pp/sl_pp_version.c')
-rw-r--r--src/glsl/pp/sl_pp_version.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/glsl/pp/sl_pp_version.c b/src/glsl/pp/sl_pp_version.c
index 6cd63f4925c..814da46a672 100644
--- a/src/glsl/pp/sl_pp_version.c
+++ b/src/glsl/pp/sl_pp_version.c
@@ -79,18 +79,11 @@ sl_pp_version(struct sl_pp_context *context,
break;
case SL_PP_IDENTIFIER:
- {
- const char *id = sl_pp_context_cstr(context, input[i].data.identifier);
-
- if (!id) {
- return -1;
- }
- if (strcmp(id, "version")) {
- return 0;
- }
- i++;
- found_version = 1;
+ if (input[i].data.identifier != context->dict.version) {
+ return 0;
}
+ i++;
+ found_version = 1;
break;
default: