forked from mirrors/0ad
- 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:
@@ -352,7 +352,7 @@ void CObjectBase::CalculateVariation(std::set<CStr>& strings, variation_key& cho
|
||||
|
||||
for (uint i = 0; i < grp->size(); ++i)
|
||||
if (strings.count((*grp)[i].m_VariantName))
|
||||
matches.push_back(i);
|
||||
matches.push_back((u8)i); // "protected" by debug_assert
|
||||
|
||||
// If there's only one match, choose that one
|
||||
if (matches.size() == 1)
|
||||
@@ -366,7 +366,7 @@ void CObjectBase::CalculateVariation(std::set<CStr>& strings, variation_key& cho
|
||||
// If none matched the specified strings, choose from all the variants
|
||||
if (matches.size() == 0)
|
||||
for (uint i = 0; i < grp->size(); ++i)
|
||||
matches.push_back(i);
|
||||
matches.push_back((u8)i); // "protected" by debug_assert
|
||||
|
||||
// Sum the frequencies:
|
||||
int totalFreq = 0;
|
||||
|
||||
Reference in New Issue
Block a user