summaryrefslogtreecommitdiffstats
path: root/src/glsl/pp/sl_pp_if.c
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2009-09-23 09:37:37 +0200
committerMichal Krol <[email protected]>2009-09-23 09:37:37 +0200
commit2f89e1a5a18c4c3c88d4e7613cbfc0f85a5fcfc9 (patch)
treeee22f6c4eee50568f7633e50a11d1df382c12ae1 /src/glsl/pp/sl_pp_if.c
parent32966991c629fa43818f42912deb9deca913ef60 (diff)
glsl/pp: Add `0' and `1' to dictionary.
Diffstat (limited to 'src/glsl/pp/sl_pp_if.c')
-rw-r--r--src/glsl/pp/sl_pp_if.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/glsl/pp/sl_pp_if.c b/src/glsl/pp/sl_pp_if.c
index 5fa27fcf053..c8e958eab49 100644
--- a/src/glsl/pp/sl_pp_if.c
+++ b/src/glsl/pp/sl_pp_if.c
@@ -82,14 +82,7 @@ _parse_defined(struct sl_pp_context *context,
}
result.token = SL_PP_UINT;
- if (defined) {
- result.data._uint = sl_pp_context_add_unique_str(context, "1");
- } else {
- result.data._uint = sl_pp_context_add_unique_str(context, "0");
- }
- if (result.data._uint == -1) {
- return -1;
- }
+ result.data._uint = (defined ? context->dict._1 : context->dict._0);
if (sl_pp_process_out(state, &result)) {
strcpy(context->error_msg, "out of memory");