From f58f111cfd5b8e7c3a91af2adc32661729643cdc Mon Sep 17 00:00:00 2001 From: Kyzentun Date: Sat, 2 Aug 2014 19:34:39 -0600 Subject: [PATCH] Changed GetStylesForGame to not traverse the list of styles twice. --- src/GameManager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/GameManager.cpp b/src/GameManager.cpp index 65a65e9da4..a65709ee95 100644 --- a/src/GameManager.cpp +++ b/src/GameManager.cpp @@ -3169,12 +3169,13 @@ public: luaL_error(L, "GetStylesForGame: Invalid Game: '%s'", game_name.c_str()); } vector aStyles; + lua_createtable(L, 0, 0); for( int s=0; pGame->m_apStyles[s]; ++s ) { Style *pStyle = const_cast