Skip to content

Commit

Permalink
Simplified TEST_PROFILE macro in choose_src_profile().
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jan 12, 2011
1 parent 99fec26 commit 9baf684
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions mojoshader_compiler.c
Expand Up @@ -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);
Expand Down

0 comments on commit 9baf684

Please sign in to comment.