From 361d32d37ffbe133760fcbfa314f60ccd4a8e8a8 Mon Sep 17 00:00:00 2001 From: dankan1890 Date: Fri, 29 Jan 2016 00:43:18 +0100 Subject: Small code cleanup: - corealloc.h: added macro definition for global_alloc (nothrow) memory allocation. - textbuf.cpp / wavwrite.cpp: removed pointless cast. - debugcmd.cpp / luaengine.cpp / render.cpp: avoid strlen calls in a loop. - diimage.cpp: simplified "device_image_interface::set_image_filename" function. - miscmenu.cpp / selgame.h / video.cpp(h): replaced int with bool where applicable. - ui.cpp: removed unused code. --- src/emu/luaengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/emu/luaengine.cpp') diff --git a/src/emu/luaengine.cpp b/src/emu/luaengine.cpp index 733c99537c7..f1d12757ed7 100644 --- a/src/emu/luaengine.cpp +++ b/src/emu/luaengine.cpp @@ -1049,7 +1049,7 @@ void lua_engine::periodic_check() osd_lock_acquire(lock); if (msg.ready == 1) { lua_settop(m_lua_state, 0); - int status = luaL_loadbuffer(m_lua_state, msg.text.c_str(), strlen(msg.text.c_str()), "=stdin"); + int status = luaL_loadbuffer(m_lua_state, msg.text.c_str(), msg.text.length(), "=stdin"); if (incomplete(status)==0) /* cannot try to add lines? */ { if (status == LUA_OK) status = docall(0, LUA_MULTRET); -- cgit v1.2.3