File tree Expand file tree Collapse file tree 1 file changed +12
-17
lines changed Expand file tree Collapse file tree 1 file changed +12
-17
lines changed Original file line number Diff line number Diff line change @@ -23,23 +23,18 @@ namespace GLua = GarrysMod::Lua;
23
23
reinterpret_cast <GLua::ILuaInterface*>(L->luabase); \
24
24
L->luabase->SetState (L)
25
25
26
- #define lua_protected_fn (name ) \
27
- int name##__Imp(GLua::ILuaInterface* lua); \
28
- int name (lua_State* L) { \
29
- auto lua = lua_interface (); \
30
- const auto start = std::chrono::high_resolution_clock::now (); \
31
- try { \
32
- int ret = name##__Imp (lua); \
33
- const auto end = std::chrono::high_resolution_clock::now (); \
34
- const std::chrono::duration<double , std::milli> dur = end - start; \
35
- if (dur.count () > 1 ) \
36
- lua->Msg (#name " execution time: %.2fms\n " , dur.count ()); \
37
- return ret; \
38
- } catch (const std::exception& e) { \
39
- lua->ThrowError (e.what ()); \
40
- return 0 ; \
41
- } \
42
- } \
26
+ #define lua_protected_fn (name ) \
27
+ int name##__Imp(GLua::ILuaInterface* lua); \
28
+ int name (lua_State* L) { \
29
+ auto lua = lua_interface (); \
30
+ try { \
31
+ int ret = name##__Imp (lua); \
32
+ return ret; \
33
+ } catch (const std::exception& e) { \
34
+ lua->ThrowError (e.what ()); \
35
+ return 0 ; \
36
+ } \
37
+ } \
43
38
int name##__Imp([[maybe_unused]] GarrysMod::Lua::ILuaInterface* lua)
44
39
45
40
namespace async_postgres {
You can’t perform that action at this time.
0 commit comments