Simplified TEST_PROFILE macro in choose_src_profile().
authorRyan C. Gordon <icculus@icculus.org>
Tue, 11 Jan 2011 20:46:24 -0500
changeset 972 993c4d6e21a8
parent 971 58dcafbc908b
child 973 6d4cdbc21301
Simplified TEST_PROFILE macro in choose_src_profile().
mojoshader_compiler.c
--- a/mojoshader_compiler.c	Tue Jan 11 20:39:09 2011 -0500
+++ b/mojoshader_compiler.c	Tue Jan 11 20:46:24 2011 -0500
@@ -3250,12 +3250,9 @@
 
 static void choose_src_profile(Context *ctx, const char *srcprofile)
 {
-    #define TEST_PROFILE(x) do { \
-        if (strcmp(srcprofile, x) == 0) { \
-            ctx->source_profile = x; \
-            return; \
-        } \
-    } while (0)
+    ctx->source_profile = srcprofile;
+
+    #define TEST_PROFILE(x) if (strcmp(srcprofile, x) == 0) { return; }
 
     TEST_PROFILE(MOJOSHADER_SRC_PROFILE_HLSL_VS_1_1);
     TEST_PROFILE(MOJOSHADER_SRC_PROFILE_HLSL_VS_2_0);