From 15fbd3445307e4350ef0d2f69cdedb518910670b Mon Sep 17 00:00:00 2001 From: DarthArgus Date: Fri, 16 Oct 2015 23:34:57 -0500 Subject: [PATCH] almost no more warnings --- .../ServerCreatureObjectTemplate.cpp | 42 +++++++++---------- .../src/shared/MxCifQuadTreeBounds.h | 1 + .../src/shared/core/CSHandler.cpp | 2 +- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/engine/server/library/serverGame/src/shared/objectTemplate/ServerCreatureObjectTemplate.cpp b/engine/server/library/serverGame/src/shared/objectTemplate/ServerCreatureObjectTemplate.cpp index e5ba5655..babf8d0a 100644 --- a/engine/server/library/serverGame/src/shared/objectTemplate/ServerCreatureObjectTemplate.cpp +++ b/engine/server/library/serverGame/src/shared/objectTemplate/ServerCreatureObjectTemplate.cpp @@ -168,7 +168,7 @@ int ServerCreatureObjectTemplate::getAttributes(Attributes index) const base = dynamic_cast(m_baseData); } - DEBUG_FATAL(index < 0 || index >= 6, ("template param index out of range")); + DEBUG_FATAL(static_cast(index) < 0 || static_cast(index) >= 6, ("template param static_cast(index) (m_baseData); } - DEBUG_FATAL(index < 0 || index >= 6, ("template param index out of range")); + DEBUG_FATAL(static_cast(index) < 0 || static_cast(index) >= 6, ("template param static_cast(index) (m_baseData); } - DEBUG_FATAL(index < 0 || index >= 6, ("template param index out of range")); + DEBUG_FATAL(static_cast(index) < 0 || static_cast(index) >= 6, ("template param static_cast(index) (m_baseData); } - DEBUG_FATAL(index < 0 || index >= 6, ("template param index out of range")); + DEBUG_FATAL(static_cast(index) < 0 || static_cast(index) >= 6, ("template param static_cast(index) (m_baseData); } - DEBUG_FATAL(index < 0 || index >= 6, ("template param index out of range")); + DEBUG_FATAL(static_cast(index) < 0 || static_cast(index) >= 6, ("template param static_cast(index) (m_baseData); } - DEBUG_FATAL(index < 0 || index >= 6, ("template param index out of range")); + DEBUG_FATAL(static_cast(index) < 0 || static_cast(index) >= 6, ("template param static_cast(index) (m_baseData); } - DEBUG_FATAL(index < 0 || index >= 6, ("template param index out of range")); + DEBUG_FATAL(static_cast(index) < 0 || static_cast(index) >= 6, ("template param static_cast(index) (m_baseData); } - DEBUG_FATAL(index < 0 || index >= 6, ("template param index out of range")); + DEBUG_FATAL(static_cast(index) < 0 || static_cast(index) >= 6, ("template param static_cast(index) (m_baseData); } - DEBUG_FATAL(index < 0 || index >= 6, ("template param index out of range")); + DEBUG_FATAL(static_cast(index) < 0 || static_cast(index) >= 6, ("template param static_cast(index) getAttribModsCount(); - if (index < baseCount) + if (static_cast(index) < baseCount) { base->getAttribMods(data, index); return; @@ -1403,7 +1403,7 @@ void ServerCreatureObjectTemplate::getAttribMods(AttribMod &data, int index) con index -= baseCount; } - DEBUG_FATAL(index < 0 || static_cast(index) >= m_attribMods.size(), ("template param index out of range")); + DEBUG_FATAL(static_cast(index) < 0 || static_cast(index) >= m_attribMods.size(), ("template param static_cast(index) (structTemplate); @@ -1441,7 +1441,7 @@ void ServerCreatureObjectTemplate::getAttribModsMin(AttribMod &data, int index) if (m_attribModsAppend && base != NULL) { int baseCount = base->getAttribModsCount(); - if (index < baseCount) + if (static_cast(index) < baseCount) { base->getAttribModsMin(data, index); return; @@ -1449,7 +1449,7 @@ void ServerCreatureObjectTemplate::getAttribModsMin(AttribMod &data, int index) index -= baseCount; } - DEBUG_FATAL(index < 0 || static_cast(index) >= m_attribMods.size(), ("template param index out of range")); + DEBUG_FATAL(static_cast(index) < 0 || static_cast(index) >= m_attribMods.size(), ("template param static_cast(index) (structTemplate); @@ -1487,7 +1487,7 @@ void ServerCreatureObjectTemplate::getAttribModsMax(AttribMod &data, int index) if (m_attribModsAppend && base != NULL) { int baseCount = base->getAttribModsCount(); - if (index < baseCount) + if (static_cast(index) < baseCount) { base->getAttribModsMax(data, index); return; @@ -1495,7 +1495,7 @@ void ServerCreatureObjectTemplate::getAttribModsMax(AttribMod &data, int index) index -= baseCount; } - DEBUG_FATAL(index < 0 || static_cast(index) >= m_attribMods.size(), ("template param index out of range")); + DEBUG_FATAL(static_cast(index) < 0 || static_cast(index) >= m_attribMods.size(), ("template param static_cast(index) (structTemplate); @@ -2007,7 +2007,7 @@ float ServerCreatureObjectTemplate::getMaxMentalStates(MentalStates index) const base = dynamic_cast(m_baseData); } - DEBUG_FATAL(index < 0 || index >= 4, ("template param index out of range")); + DEBUG_FATAL(static_cast(index) < 0 || static_cast(index) >= 4, ("template param static_cast(index) (m_baseData); } - DEBUG_FATAL(index < 0 || index >= 4, ("template param index out of range")); + DEBUG_FATAL(static_cast(index) < 0 || static_cast(index) >= 4, ("template param static_cast(index) (m_baseData); } - DEBUG_FATAL(index < 0 || index >= 4, ("template param index out of range")); + DEBUG_FATAL(static_cast(index) < 0 || static_cast(index) >= 4, ("template param static_cast(index) (m_baseData); } - DEBUG_FATAL(index < 0 || index >= 4, ("template param index out of range")); + DEBUG_FATAL(static_cast(index) < 0 || static_cast(index) >= 4, ("template param static_cast(index) (m_baseData); } - DEBUG_FATAL(index < 0 || index >= 4, ("template param index out of range")); + DEBUG_FATAL(static_cast(index) < 0 || static_cast(index) >= 4, ("template param static_cast(index) (m_baseData); } - DEBUG_FATAL(index < 0 || index >= 4, ("template param index out of range")); + DEBUG_FATAL(static_cast(index) < 0 || static_cast(index) >= 4, ("template param static_cast(index)