mirror of
https://github.com/SWG-Source/src.git
synced 2026-10-16 08:13:31 -04:00
ifdef added to code not run unless debug
This commit is contained in:
@@ -109,7 +109,9 @@ void LocationBuffer::getLocationList(const NetworkId &objectId, size_t listId, s
|
|||||||
|
|
||||||
for (LoadDataType::const_iterator i=m_loadData.find(IndexKey(objectId, listId, 0)); (i!=m_loadData.end()) && (i->first.m_objectId == objectId) && (i->first.m_listId == listId); ++i)
|
for (LoadDataType::const_iterator i=m_loadData.find(IndexKey(objectId, listId, 0)); (i!=m_loadData.end()) && (i->first.m_objectId == objectId) && (i->first.m_listId == listId); ++i)
|
||||||
{
|
{
|
||||||
|
#ifdef _DEBUG
|
||||||
DEBUG_FATAL(i->first.m_index != expectedIndex++,("Programmer bug: location list was not sorted or had gaps in the sequence. Object id %s, list id %i, sequence %i\n",objectId.getValueString().c_str(), listId, i->first.m_index));
|
DEBUG_FATAL(i->first.m_index != expectedIndex++,("Programmer bug: location list was not sorted or had gaps in the sequence. Object id %s, list id %i, sequence %i\n",objectId.getValueString().c_str(), listId, i->first.m_index));
|
||||||
|
#endif
|
||||||
|
|
||||||
values.push_back(i->second);
|
values.push_back(i->second);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,7 +98,9 @@ void ScriptBuffer::getScriptsForObject(const NetworkId &objectId, std::vector<st
|
|||||||
|
|
||||||
for (LoadedDataType::const_iterator i=m_loadedData->find(IndexKey(objectId,0)); (i!=m_loadedData->end()) && (i->first.m_objectId==objectId); ++i)
|
for (LoadedDataType::const_iterator i=m_loadedData->find(IndexKey(objectId,0)); (i!=m_loadedData->end()) && (i->first.m_objectId==objectId); ++i)
|
||||||
{
|
{
|
||||||
|
#ifdef _DEBUG
|
||||||
DEBUG_WARNING((i->first.m_index != expectedIndex++), ("Programmer bug: Script buffer was not sorted, or there were gaps in the sequence. ObjectId %s, sequence number %i\n",objectId.getValueString().c_str(),i->first.m_index));
|
DEBUG_WARNING((i->first.m_index != expectedIndex++), ("Programmer bug: Script buffer was not sorted, or there were gaps in the sequence. ObjectId %s, sequence number %i\n",objectId.getValueString().c_str(),i->first.m_index));
|
||||||
|
#endif
|
||||||
scripts.push_back(i->second);
|
scripts.push_back(i->second);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user