Skip to content

Commit

Permalink
CLeanup
Browse files Browse the repository at this point in the history
  • Loading branch information
chrilith committed Feb 25, 2016
1 parent 7c8473e commit b5f2471
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Lua Module/Script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
ScriptManager *LuaMan = ScriptManager::GetInstance();

ScriptInfo Script[SCRIPT_COUNT];
int ScriptCount = HID_EMPTY; // TODO: changer le nom de la const
int ScriptCount = HID_EMPTY;

ScriptManager::ScriptManager() {
_scriptCount = HID_EMPTY;
Expand All @@ -25,11 +25,11 @@ int ScriptManager::ReleaseSlot(lua_State *L) {
_lock.Acquire();

ScriptInfo *nfo = (*(ScriptInfo **)lua_touserdata(L, 1));
lua_unref(L, nfo->luaRef); // Utile puisque le script est fini ?
lua_unref(L, nfo->luaRef);
nfo->luaState = NULL;

_scriptCount--;
DebugC(L"Dev: %d", _scriptCount);
DebugC(L"Dec: %d", _scriptCount);

_lock.Release();
return 0;
Expand Down

0 comments on commit b5f2471

Please sign in to comment.