From 464011031e1a5e14946511cee70e120c045b4fda Mon Sep 17 00:00:00 2001 From: terencehill Date: Tue, 27 Jun 2017 16:47:00 +0200 Subject: [PATCH] Remove a few useless MACRO_BEGIN/MACRO_END --- qcsrc/client/miscfunctions.qh | 4 ++-- qcsrc/client/view.qc | 7 +++---- qcsrc/menu/draw.qh | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/qcsrc/client/miscfunctions.qh b/qcsrc/client/miscfunctions.qh index cbb0e071d..f23a3976b 100644 --- a/qcsrc/client/miscfunctions.qh +++ b/qcsrc/client/miscfunctions.qh @@ -45,8 +45,8 @@ float cvar_or(string cv, float v); vector project_3d_to_2d(vector vec); vector drawfontscale; -#define draw_beginBoldFont() MACRO_BEGIN { drawfont = FONT_USER + 2; } MACRO_END -#define draw_endBoldFont() MACRO_BEGIN { drawfont = FONT_USER + 1; } MACRO_END +#define draw_beginBoldFont() drawfont = FONT_USER + 2 +#define draw_endBoldFont() drawfont = FONT_USER + 1 float expandingbox_sizefactor_from_fadelerp(float fadelerp); diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index ffa5b420a..75afcfccb 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -62,10 +62,9 @@ float autocvar_cl_leanmodel_highpass = 0.2; float autocvar_cl_leanmodel_lowpass = 0.05; #define avg_factor(avg_time) (1 - exp(-frametime / max(0.001, avg_time))) -#define lowpass(value, frac, ref_store, ret) MACRO_BEGIN \ -{ \ - ret = ref_store = ref_store * (1 - frac) + (value) * frac; \ -} MACRO_END + +#define lowpass(value, frac, ref_store, ret) \ + ret = ref_store = ref_store * (1 - frac) + (value) * frac; #define lowpass_limited(value, frac, limit, ref_store, ret) MACRO_BEGIN \ { \ diff --git a/qcsrc/menu/draw.qh b/qcsrc/menu/draw.qh index b12534f7d..69178cb03 100644 --- a/qcsrc/menu/draw.qh +++ b/qcsrc/menu/draw.qh @@ -9,8 +9,8 @@ vector draw_scale; float draw_alpha; void draw_reset(float cw, float ch, float ox, float oy); -#define draw_beginBoldFont() MACRO_BEGIN { drawfont = FONT_USER + 3; } MACRO_END -#define draw_endBoldFont() MACRO_BEGIN { drawfont = FONT_USER + 0; } MACRO_END +#define draw_beginBoldFont() drawfont = FONT_USER + 3 +#define draw_endBoldFont() drawfont = FONT_USER void draw_setMousePointer(string pic, vector theSize, vector theOffset); void draw_drawMousePointer(vector where); -- 2.39.2