From 9baf684f45aeb783d0f1afb89284e1afc316d4e5 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 11 Jan 2011 20:46:24 -0500 Subject: [PATCH] Simplified TEST_PROFILE macro in choose_src_profile(). --- mojoshader_compiler.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/mojoshader_compiler.c b/mojoshader_compiler.c index 90405bc2..38c5e27e 100644 --- a/mojoshader_compiler.c +++ b/mojoshader_compiler.c @@ -3250,12 +3250,9 @@ static const MOJOSHADER_astData *build_astdata(Context *ctx) 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);