From 1c1c97cbd1d7913ac12bf550ec02c97f843a0fd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot?= Date: Sun, 20 Aug 2017 13:30:50 +0200 Subject: Modernize source code: last part (#6285) * Modernize source code: last par * Use empty when needed * Use emplace_back instead of push_back when needed * For range-based loops * Initializers fixes * constructors, destructors default * c++ C stl includes --- src/script/common/c_internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/script/common/c_internal.h') diff --git a/src/script/common/c_internal.h b/src/script/common/c_internal.h index 2548ac979..35477375b 100644 --- a/src/script/common/c_internal.h +++ b/src/script/common/c_internal.h @@ -58,12 +58,12 @@ extern "C" { #define PUSH_ERROR_HANDLER(L) \ (lua_rawgeti((L), LUA_REGISTRYINDEX, CUSTOM_RIDX_BACKTRACE), lua_gettop((L))) -#define PCALL_RESL(L, RES) do { \ +#define PCALL_RESL(L, RES) { \ int result_ = (RES); \ if (result_ != 0) { \ script_error((L), result_, NULL, __FUNCTION__); \ } \ -} while (0) +} #define script_run_callbacks(L, nargs, mode) \ script_run_callbacks_f((L), (nargs), (mode), __FUNCTION__) -- cgit v1.2.3