mirror of
https://github.com/mangosfour/server.git
synced 2025-12-25 04:37:02 +00:00
[9638] Replace all C assert()s with MaNGOS ASSERT() macro.
This commit is contained in:
parent
4443737005
commit
51fd11c92c
34 changed files with 121 additions and 121 deletions
|
|
@ -233,7 +233,7 @@ static bool LoadDBC_assert_print(uint32 fsize,uint32 rsize, const std::string& f
|
|||
{
|
||||
sLog.outError("ERROR: Size of '%s' setted by format string (%u) not equal size of C++ structure (%u).",filename.c_str(),fsize,rsize);
|
||||
|
||||
// assert must fail after function call
|
||||
// ASSERT must fail after function call
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -251,7 +251,7 @@ template<class T>
|
|||
inline void LoadDBC(LocalData& localeData,barGoLink& bar, StoreProblemList& errlist, DBCStorage<T>& storage, const std::string& dbc_path, const std::string& filename)
|
||||
{
|
||||
// compatibility format and C++ structure sizes
|
||||
assert(DBCFileLoader::GetFormatRecordSize(storage.GetFormat()) == sizeof(T) || LoadDBC_assert_print(DBCFileLoader::GetFormatRecordSize(storage.GetFormat()),sizeof(T),filename));
|
||||
ASSERT(DBCFileLoader::GetFormatRecordSize(storage.GetFormat()) == sizeof(T) || LoadDBC_assert_print(DBCFileLoader::GetFormatRecordSize(storage.GetFormat()),sizeof(T),filename));
|
||||
|
||||
std::string dbc_filename = dbc_path + filename;
|
||||
if(storage.Load(dbc_filename.c_str()))
|
||||
|
|
@ -429,7 +429,7 @@ void LoadDBCStores(const std::string& dataPath)
|
|||
for(uint32 i = 0; i < sPvPDifficultyStore.GetNumRows(); ++i)
|
||||
if (PvPDifficultyEntry const* entry = sPvPDifficultyStore.LookupEntry(i))
|
||||
if (entry->bracketId > MAX_BATTLEGROUND_BRACKETS)
|
||||
assert(false && "Need update MAX_BATTLEGROUND_BRACKETS by DBC data");
|
||||
ASSERT(false && "Need update MAX_BATTLEGROUND_BRACKETS by DBC data");
|
||||
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sRandomPropertiesPointsStore, dbcPath,"RandPropPoints.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sScalingStatDistributionStore, dbcPath,"ScalingStatDistribution.dbc");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue