- fix w4 warnings

- add convenience macros for config_db(CFG_GET_SYS_VAL)
- VFSUtil::EnumDirEnts now uses flags instead of bool recursive
- UNUSED() for params, UNUSED2 (<- need better name) for variables
- config.h defines must be tested with #if (always defined) -> allows
detecting misspellings thanks to compiler warnings
- replace debug_assert(0) with debug_warn (its sole purpose)
- replace ScriptingHost::ValueToInt et al with ToPrimitive
- use nommgr.h to disable both mmgr and VC debug heap

This was SVN commit r2585.
This commit is contained in:
janwas
2005-08-09 15:55:44 +00:00
parent 630b375f4d
commit a69ac0dee9
115 changed files with 654 additions and 600 deletions
+4 -3
View File
@@ -180,7 +180,7 @@ int CObjectManager::LoadObjects()
//////////////////////////////////////////////////////////////////////////
// For ScEd:
static void GetObjectThunk(const char* path, const vfsDirEnt* ent, void* context)
static void GetObjectName_ThunkCb(const char* path, const DirEnt* UNUSED(ent), void* context)
{
std::vector<CStr>* names = (std::vector<CStr>*)context;
CStr name (path);
@@ -188,7 +188,8 @@ static void GetObjectThunk(const char* path, const vfsDirEnt* ent, void* context
}
void CObjectManager::GetAllObjectNames(std::vector<CStr>& names)
{
VFSUtil::EnumDirEnts("art/actors/", "*.xml", true, GetObjectThunk, &names);
VFSUtil::EnumDirEnts("art/actors/", VFSUtil::RECURSIVE, "*.xml",
GetObjectName_ThunkCb, &names);
}
struct CObjectThing_Entity : public CObjectThing
@@ -231,7 +232,7 @@ struct CObjectThing_Object : public CObjectThing
~CObjectThing_Object() {}
CObjectEntry* obj;
CUnit* unit;
void Create(CMatrix3D& transform, int playerID)
void Create(CMatrix3D& transform, int UNUSED(playerID))
{
unit = new CUnit(obj, obj->m_Model->Clone());
unit->GetModel()->SetTransform(transform);