From 7d4b89afc925ef3710ff9f04d86f6b2628e8e712 Mon Sep 17 00:00:00 2001 From: kervala Date: Thu, 27 Mar 2014 15:50:58 +0100 Subject: [PATCH] Fixed: Warnings with clang: wrong ! and == operators order --- code/nel/src/3d/driver/opengl/driver_opengl_vertex.cpp | 2 +- code/ryzom/client/src/game_context_menu.cpp | 4 ++-- code/ryzom/client/src/r2/editor.cpp | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_vertex.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_vertex.cpp index 6df62dfc3..c71e82ce4 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_vertex.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_vertex.cpp @@ -1809,7 +1809,7 @@ void CDriverGL::fenceOnCurVBHardIfNeeded(IVertexBufferHardGL *newVBHard) #ifndef USE_OPENGLES // 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; // if we do not activate the same (NB: newVBHard==NULL if not a VBHard). diff --git a/code/ryzom/client/src/game_context_menu.cpp b/code/ryzom/client/src/game_context_menu.cpp index 852d90931..9cf2e0e64 100644 --- a/code/ryzom/client/src/game_context_menu.cpp +++ b/code/ryzom/client/src/game_context_menu.cpp @@ -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.. _TextFollow->setActive( selection && - (! selection->slot() == UserEntity->slot()) && + (selection->slot() != UserEntity->slot()) && (!selection->isForageSource()) && (selection->isDead()==false) && (((availablePrograms & (1 << BOTCHATTYPE::DontFollow)) == 0))); @@ -484,7 +484,7 @@ void CGameContextMenu::update() if(_TextAssist) { // 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 } diff --git a/code/ryzom/client/src/r2/editor.cpp b/code/ryzom/client/src/r2/editor.cpp index c27001140..bb09bec52 100644 --- a/code/ryzom/client/src/r2/editor.cpp +++ b/code/ryzom/client/src/r2/editor.cpp @@ -206,14 +206,14 @@ CDynamicMapClient(eid, clientGateway, luaState) void CDynamicMapClientEventForwarder::nodeErased(const std::string& instanceId, const std::string& attrName, sint32 position) { //H_AUTO(R2_CDynamicMapClientEventForwarder_nodeErased) - if (!getEditor().getMode() == CEditor::EditionMode) return; + if (getEditor().getMode() != CEditor::EditionMode) return; getEditor().nodeErased(instanceId, attrName, position); } void CDynamicMapClientEventForwarder::nodeSet(const std::string& instanceId, const std::string& attrName, CObject* value) { //H_AUTO(R2_CDynamicMapClientEventForwarder_nodeSet) - if (!getEditor().getMode() == CEditor::EditionMode) return; + if (getEditor().getMode() != CEditor::EditionMode) return; getEditor().nodeSet(instanceId, attrName, value); } @@ -221,7 +221,7 @@ void CDynamicMapClientEventForwarder::nodeInserted(const std::string& instanceId const std::string& key, CObject* value) { //H_AUTO(R2_CDynamicMapClientEventForwarder_nodeInserted) - if (!getEditor().getMode() == CEditor::EditionMode) return; + if (getEditor().getMode() != CEditor::EditionMode) return; getEditor().nodeInserted(instanceId, attrName, position, key, value); } @@ -230,14 +230,14 @@ void CDynamicMapClientEventForwarder::nodeMoved( const std::string& destInstanceId, const std::string& destAttrName, sint32 destPosition) { //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); } void CDynamicMapClientEventForwarder::scenarioUpdated(CObject* highLevel, bool willTP, uint32 initialActIndex) { //H_AUTO(R2_CDynamicMapClientEventForwarder_scenarioUpdated) - if (!getEditor().getMode() == CEditor::EditionMode) return; + if (getEditor().getMode() != CEditor::EditionMode) return; getEditor().scenarioUpdated(highLevel, willTP, initialActIndex); }