ifdef added to code not run unless debug

This commit is contained in:
DarthArgus
2016-01-22 13:44:12 -06:00
parent f1d654ddc2
commit be034c71ee
2 changed files with 4 additions and 0 deletions
@@ -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)
{
#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));
#endif
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)
{
#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));
#endif
scripts.push_back(i->second);
}
}