mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-14 01:15:40 +00:00
- 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:
@@ -21,7 +21,7 @@ void CBaseEntityCollection::LoadFile( const char* path )
|
||||
m_templateFilenames[tag] = path;
|
||||
}
|
||||
|
||||
static void LoadFileThunk( const char* path, const vfsDirEnt* ent, void* context )
|
||||
static void LoadFileThunk( const char* path, const DirEnt* UNUSED(ent), void* context )
|
||||
{
|
||||
CBaseEntityCollection* this_ = (CBaseEntityCollection*)context;
|
||||
this_->LoadFile(path);
|
||||
@@ -30,7 +30,8 @@ static void LoadFileThunk( const char* path, const vfsDirEnt* ent, void* context
|
||||
int CBaseEntityCollection::loadTemplates()
|
||||
{
|
||||
// Load all files in entities/ and its subdirectories.
|
||||
THROW_ERR( VFSUtil::EnumDirEnts( "entities/", "*.xml", true, LoadFileThunk, this ) );
|
||||
THROW_ERR( VFSUtil::EnumDirEnts( "entities/", VFSUtil::RECURSIVE, "*.xml",
|
||||
LoadFileThunk, this ) );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user