diff options
author | Filippos Karapetis | 2011-01-23 15:01:24 +0000 |
---|---|---|
committer | Filippos Karapetis | 2011-01-23 15:01:24 +0000 |
commit | 125078582262b40dfa53695c5e3e30d48f1ec380 (patch) | |
tree | c0678e6a8a2ef8e68372c71b3d1d66012ce65ddb /engines/sword25/script | |
parent | 04af67d736979272e17b0dcd0e3e4371fc0d07cc (diff) | |
download | scummvm-rg350-125078582262b40dfa53695c5e3e30d48f1ec380.tar.gz scummvm-rg350-125078582262b40dfa53695c5e3e30d48f1ec380.tar.bz2 scummvm-rg350-125078582262b40dfa53695c5e3e30d48f1ec380.zip |
SWORD25: Replaced BS_ASSERT() with assert()
svn-id: r55464
Diffstat (limited to 'engines/sword25/script')
-rw-r--r-- | engines/sword25/script/lua_extensions.cpp | 4 | ||||
-rw-r--r-- | engines/sword25/script/luabindhelper.cpp | 8 | ||||
-rw-r--r-- | engines/sword25/script/luacallback.cpp | 4 | ||||
-rw-r--r-- | engines/sword25/script/luascript.cpp | 8 |
4 files changed, 12 insertions, 12 deletions
diff --git a/engines/sword25/script/lua_extensions.cpp b/engines/sword25/script/lua_extensions.cpp index 50d7acc52e..5ba38afc36 100644 --- a/engines/sword25/script/lua_extensions.cpp +++ b/engines/sword25/script/lua_extensions.cpp @@ -50,7 +50,7 @@ static int warning(lua_State *L) { lua_pop(L, 1); #ifdef DEBUG - BS_ASSERT(__startStackDepth == lua_gettop(L)); + assert(__startStackDepth == lua_gettop(L)); #endif return 0; @@ -63,7 +63,7 @@ static const luaL_reg GLOBAL_FUNCTIONS[] = { bool LuaScriptEngine::registerStandardLibExtensions() { lua_State *L = _state; - BS_ASSERT(_state); + assert(_state); if (!LuaBindhelper::addFunctionsToLib(L, "", GLOBAL_FUNCTIONS)) return false; diff --git a/engines/sword25/script/luabindhelper.cpp b/engines/sword25/script/luabindhelper.cpp index b227754489..5ff9708b95 100644 --- a/engines/sword25/script/luabindhelper.cpp +++ b/engines/sword25/script/luabindhelper.cpp @@ -123,7 +123,7 @@ bool LuaBindhelper::addFunctionsToLib(lua_State *L, const Common::String &libNam } #ifdef DEBUG - BS_ASSERT(__startStackDepth == lua_gettop(L)); + assert(__startStackDepth == lua_gettop(L)); #endif return true; @@ -168,7 +168,7 @@ bool LuaBindhelper::addConstantsToLib(lua_State *L, const Common::String &libNam } #ifdef DEBUG - BS_ASSERT(__startStackDepth == lua_gettop(L)); + assert(__startStackDepth == lua_gettop(L)); #endif return true; @@ -207,7 +207,7 @@ bool LuaBindhelper::addMethodsToClass(lua_State *L, const Common::String &classN lua_pop(L, 1); #ifdef DEBUG - BS_ASSERT(__startStackDepth == lua_gettop(L)); + assert(__startStackDepth == lua_gettop(L)); #endif return true; @@ -243,7 +243,7 @@ bool LuaBindhelper::setClassGCHandler(lua_State *L, const Common::String &classN lua_pop(L, 1); #ifdef DEBUG - BS_ASSERT(__startStackDepth == lua_gettop(L)); + assert(__startStackDepth == lua_gettop(L)); #endif return true; diff --git a/engines/sword25/script/luacallback.cpp b/engines/sword25/script/luacallback.cpp index 39ce29ea77..137e37bf8d 100644 --- a/engines/sword25/script/luacallback.cpp +++ b/engines/sword25/script/luacallback.cpp @@ -52,7 +52,7 @@ LuaCallback::~LuaCallback() { } void LuaCallback::registerCallbackFunction(lua_State *L, uint objectHandle) { - BS_ASSERT(lua_isfunction(L, -1)); + assert(lua_isfunction(L, -1)); ensureObjectCallbackTableExists(L, objectHandle); // Store function in the callback object table store @@ -64,7 +64,7 @@ void LuaCallback::registerCallbackFunction(lua_State *L, uint objectHandle) { } void LuaCallback::unregisterCallbackFunction(lua_State *L, uint objectHandle) { - BS_ASSERT(lua_isfunction(L, -1)); + assert(lua_isfunction(L, -1)); ensureObjectCallbackTableExists(L, objectHandle); // Iterate over all elements of the object callback table and remove the function from it diff --git a/engines/sword25/script/luascript.cpp b/engines/sword25/script/luascript.cpp index 140c09041b..cce01d58c7 100644 --- a/engines/sword25/script/luascript.cpp +++ b/engines/sword25/script/luascript.cpp @@ -146,7 +146,7 @@ bool LuaScriptEngine::executeFile(const Common::String &fileName) { // Get a pointer to the package manager PackageManager *pPackage = Kernel::getInstance()->getPackage(); - BS_ASSERT(pPackage); + assert(pPackage); // File read uint fileSize; @@ -154,7 +154,7 @@ bool LuaScriptEngine::executeFile(const Common::String &fileName) { if (!fileData) { error("Couldn't read \"%s\".", fileName.c_str()); #ifdef DEBUG - BS_ASSERT(__startStackDepth == lua_gettop(_state)); + assert(__startStackDepth == lua_gettop(_state)); #endif return false; } @@ -164,7 +164,7 @@ bool LuaScriptEngine::executeFile(const Common::String &fileName) { // Release file buffer delete[] fileData; #ifdef DEBUG - BS_ASSERT(__startStackDepth == lua_gettop(_state)); + assert(__startStackDepth == lua_gettop(_state)); #endif return false; } @@ -173,7 +173,7 @@ bool LuaScriptEngine::executeFile(const Common::String &fileName) { delete[] fileData; #ifdef DEBUG - BS_ASSERT(__startStackDepth == lua_gettop(_state)); + assert(__startStackDepth == lua_gettop(_state)); #endif return true; |