Fixed: Warnings with clang: wrong ! and == operators order

This commit is contained in:
kervala 2014-03-27 15:50:58 +01:00
parent 48682299cf
commit 7d4b89afc9
3 changed files with 8 additions and 8 deletions

View file

@ -1809,7 +1809,7 @@ void CDriverGL::fenceOnCurVBHardIfNeeded(IVertexBufferHardGL *newVBHard)
#ifndef USE_OPENGLES #ifndef USE_OPENGLES
// If old is not a VBHard, or if not a NVidia VBHard, no-op. // If old is not a VBHard, or if not a NVidia VBHard, no-op.
if( _CurrentVertexBufferHard==NULL || !_CurrentVertexBufferHard->VBType == IVertexBufferHardGL::NVidiaVB) if( _CurrentVertexBufferHard==NULL || _CurrentVertexBufferHard->VBType != IVertexBufferHardGL::NVidiaVB)
return; return;
// if we do not activate the same (NB: newVBHard==NULL if not a VBHard). // if we do not activate the same (NB: newVBHard==NULL if not a VBHard).

View file

@ -473,7 +473,7 @@ void CGameContextMenu::update()
// Action possible only if the client is not already busy and the selection is able to do this with you.. // Action possible only if the client is not already busy and the selection is able to do this with you..
_TextFollow->setActive( _TextFollow->setActive(
selection && selection &&
(! selection->slot() == UserEntity->slot()) && (selection->slot() != UserEntity->slot()) &&
(!selection->isForageSource()) && (!selection->isForageSource()) &&
(selection->isDead()==false) && (selection->isDead()==false) &&
(((availablePrograms & (1 << BOTCHATTYPE::DontFollow)) == 0))); (((availablePrograms & (1 << BOTCHATTYPE::DontFollow)) == 0)));
@ -484,7 +484,7 @@ void CGameContextMenu::update()
if(_TextAssist) if(_TextAssist)
{ {
// Action possible only if the client is not already busy and the selection is able to do this with you.. // Action possible only if the client is not already busy and the selection is able to do this with you..
_TextAssist->setActive(!R2::getEditor().isDMing() && selection && (! selection->slot() == UserEntity->slot()) && (!selection->isForageSource()) && (selection->isDead()==false)); _TextAssist->setActive(!R2::getEditor().isDMing() && selection && (selection->slot() != UserEntity->slot()) && (!selection->isForageSource()) && (selection->isDead()==false));
// See also below for mount/packer // See also below for mount/packer
} }

View file

@ -206,14 +206,14 @@ CDynamicMapClient(eid, clientGateway, luaState)
void CDynamicMapClientEventForwarder::nodeErased(const std::string& instanceId, const std::string& attrName, sint32 position) void CDynamicMapClientEventForwarder::nodeErased(const std::string& instanceId, const std::string& attrName, sint32 position)
{ {
//H_AUTO(R2_CDynamicMapClientEventForwarder_nodeErased) //H_AUTO(R2_CDynamicMapClientEventForwarder_nodeErased)
if (!getEditor().getMode() == CEditor::EditionMode) return; if (getEditor().getMode() != CEditor::EditionMode) return;
getEditor().nodeErased(instanceId, attrName, position); getEditor().nodeErased(instanceId, attrName, position);
} }
void CDynamicMapClientEventForwarder::nodeSet(const std::string& instanceId, const std::string& attrName, CObject* value) void CDynamicMapClientEventForwarder::nodeSet(const std::string& instanceId, const std::string& attrName, CObject* value)
{ {
//H_AUTO(R2_CDynamicMapClientEventForwarder_nodeSet) //H_AUTO(R2_CDynamicMapClientEventForwarder_nodeSet)
if (!getEditor().getMode() == CEditor::EditionMode) return; if (getEditor().getMode() != CEditor::EditionMode) return;
getEditor().nodeSet(instanceId, attrName, value); getEditor().nodeSet(instanceId, attrName, value);
} }
@ -221,7 +221,7 @@ void CDynamicMapClientEventForwarder::nodeInserted(const std::string& instanceId
const std::string& key, CObject* value) const std::string& key, CObject* value)
{ {
//H_AUTO(R2_CDynamicMapClientEventForwarder_nodeInserted) //H_AUTO(R2_CDynamicMapClientEventForwarder_nodeInserted)
if (!getEditor().getMode() == CEditor::EditionMode) return; if (getEditor().getMode() != CEditor::EditionMode) return;
getEditor().nodeInserted(instanceId, attrName, position, key, value); getEditor().nodeInserted(instanceId, attrName, position, key, value);
} }
@ -230,14 +230,14 @@ void CDynamicMapClientEventForwarder::nodeMoved(
const std::string& destInstanceId, const std::string& destAttrName, sint32 destPosition) const std::string& destInstanceId, const std::string& destAttrName, sint32 destPosition)
{ {
//H_AUTO(R2_CDynamicMapClientEventForwarder_nodeMoved) //H_AUTO(R2_CDynamicMapClientEventForwarder_nodeMoved)
if (!getEditor().getMode() == CEditor::EditionMode) return; if (getEditor().getMode() != CEditor::EditionMode) return;
getEditor().nodeMoved(instanceId, attrName, position, destInstanceId, destAttrName, destPosition); getEditor().nodeMoved(instanceId, attrName, position, destInstanceId, destAttrName, destPosition);
} }
void CDynamicMapClientEventForwarder::scenarioUpdated(CObject* highLevel, bool willTP, uint32 initialActIndex) void CDynamicMapClientEventForwarder::scenarioUpdated(CObject* highLevel, bool willTP, uint32 initialActIndex)
{ {
//H_AUTO(R2_CDynamicMapClientEventForwarder_scenarioUpdated) //H_AUTO(R2_CDynamicMapClientEventForwarder_scenarioUpdated)
if (!getEditor().getMode() == CEditor::EditionMode) return; if (getEditor().getMode() != CEditor::EditionMode) return;
getEditor().scenarioUpdated(highLevel, willTP, initialActIndex); getEditor().scenarioUpdated(highLevel, willTP, initialActIndex);
} }