Skip to content

Commit 5017e89

Browse files
committed
Couple of code cleanups
1 parent e4041e6 commit 5017e89

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

scripting/lua_scripting.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ bool CScriptEngine::ExecuteLua (DISPID & dispid, // dispatch ID, will be set to
621621

622622
if (lua_gettop (L) > 0)
623623
{
624-
if (lua_type (L, 1) == LUA_TBOOLEAN)
624+
if (lua_isboolean (L, 1))
625625
*result = lua_toboolean (L, 1);
626626
else
627627
*result = lua_tonumber (L, 1); // I use number rather than boolean

scripting/methods/methods_spellchecker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ unsigned char cAction = ActionCode [0];
305305
}
306306

307307
// if it returns false, there was a problem
308-
if (lua_type (App.m_SpellChecker_Lua, -1) == LUA_TBOOLEAN)
308+
if (lua_isboolean (App.m_SpellChecker_Lua, -1))
309309
{
310310
int ok = lua_toboolean (App.m_SpellChecker_Lua, -1);
311311
if (!ok)

stdafx.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@
3737
#define _INC_MALLOC // exclude standard memory alloc procedures
3838
#endif
3939

40+
// disable memory checking for speed
41+
// comment out to re-enable
42+
#ifdef _DEBUG
43+
#undef DEBUG_NEW
44+
#define DEBUG_NEW new
45+
#endif
46+
4047
#define USE_PYTHON // Nick's "use Python" extension ;)
4148
#define USE_TCL // Nick's "use TCL" extension ;)
4249
#define USE_PHP // Nick's "use PHP" extension ;)

0 commit comments

Comments
 (0)