From 9344a79233882ac278b3812b91b6edf874ef5d16 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Thu, 17 Mar 2011 00:42:38 +0100 Subject: Micro-optimizations related to std::string * Rely on the fact that a std::string is empty by default * Use std::string::empty() rather than comparing to "" * Construct with std::string() rather than from "" Reviewed-by: Bertram --- src/scripting/luascript.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/scripting/luascript.cpp') diff --git a/src/scripting/luascript.cpp b/src/scripting/luascript.cpp index ff993899..a9c43b72 100644 --- a/src/scripting/luascript.cpp +++ b/src/scripting/luascript.cpp @@ -80,7 +80,7 @@ int LuaScript::execute() res = lua_tointeger(mState, -1); lua_pop(mState, 1); return res; - mCurFunction = ""; + mCurFunction.clear(); } void LuaScript::load(const char *prog, const char *name) -- cgit v1.2.3-70-g09d2