From 41a197060a2ae9cebdf301b080190ea7fee384b5 Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 14 May 2010 11:41:28 +0200 Subject: [PATCH 1/2] Changed: #825 Remove all warning when compiling Ryzom on Linux (patch provided by ThibG) --- code/nel/include/nel/sound/mixing_track.h | 2 +- code/nel/src/misc/eval_num_expr.cpp | 2 +- code/nel/src/net/naming_client.cpp | 2 +- code/nel/src/pacs/build_indoor.cpp | 2 +- code/nel/src/pacs/collision_mesh_build.h | 4 ++-- code/nel/src/pacs/local_retriever.cpp | 16 ++++++++-------- code/nel/src/sound/simple_source.cpp | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/code/nel/include/nel/sound/mixing_track.h b/code/nel/include/nel/sound/mixing_track.h index 4ca328b7b..98f97db42 100644 --- a/code/nel/include/nel/sound/mixing_track.h +++ b/code/nel/include/nel/sound/mixing_track.h @@ -38,7 +38,7 @@ class CTrack { public: /// Constructor - CTrack() : m_PhysicalSource(NULL), m_LogicalSource(NULL) { } + CTrack() : m_LogicalSource(NULL), m_PhysicalSource(NULL) { } /// Init inline void init(ISoundDriver *soundDriver) { m_PhysicalSource = soundDriver->createSource(); } /// Destructor diff --git a/code/nel/src/misc/eval_num_expr.cpp b/code/nel/src/misc/eval_num_expr.cpp index 723b25b75..449277bbc 100644 --- a/code/nel/src/misc/eval_num_expr.cpp +++ b/code/nel/src/misc/eval_num_expr.cpp @@ -270,7 +270,7 @@ CEvalNumExpr::TReturnState CEvalNumExpr::getNextToken (TToken &token) return NoError; } // Is a number ? - else if ((currentChar >= '0') && (currentChar <= '9') || (currentChar == '.')) + else if (((currentChar >= '0') && (currentChar <= '9')) || (currentChar == '.')) { // This is a number token = Number; diff --git a/code/nel/src/net/naming_client.cpp b/code/nel/src/net/naming_client.cpp index cfc47a7ff..5c735cf97 100644 --- a/code/nel/src/net/naming_client.cpp +++ b/code/nel/src/net/naming_client.cpp @@ -231,7 +231,7 @@ static TCallbackItem NamingClientCallbackArray[] = void CNamingClient::connect( const CInetAddress &addr, CCallbackNetBase::TRecordingState rec, const vector &/* addresses */ ) { - nlassert (_Connection == NULL || _Connection != NULL && !_Connection->connected ()); + nlassert (_Connection == NULL || (_Connection != NULL && !_Connection->connected ())); if (_Connection == NULL) { diff --git a/code/nel/src/pacs/build_indoor.cpp b/code/nel/src/pacs/build_indoor.cpp index 672088fa8..06e0b1bff 100644 --- a/code/nel/src/pacs/build_indoor.cpp +++ b/code/nel/src/pacs/build_indoor.cpp @@ -185,7 +185,7 @@ void followBorder(CInteriorSurface &surface, uint first, uint edge, uint sens, v loop = false; // -1 means no neighbor at all, -2 means a neighbor that is not available yet sint32 thisOpposite = (next != NULL) ? next->InternalSurface : (current->Visibility[nextEdge] ? -1 : -2); - if (thisOpposite != currentSurfId && thisOpposite != oppositeSurfId || + if ((thisOpposite != currentSurfId && thisOpposite != oppositeSurfId) || (loop = (current->EdgeFlags[nextEdge] && !allowThis))) { // if reaches the end of the border, then quits. diff --git a/code/nel/src/pacs/collision_mesh_build.h b/code/nel/src/pacs/collision_mesh_build.h index 0a373703a..80c0bf463 100644 --- a/code/nel/src/pacs/collision_mesh_build.h +++ b/code/nel/src/pacs/collision_mesh_build.h @@ -182,8 +182,8 @@ public: // check each edge of each face for (i=0; i= CCollisionFace::InteriorSurfaceFirst && !linkInterior) + if ((Faces[i].Surface == CCollisionFace::ExteriorSurface && linkInterior) || + (Faces[i].Surface >= CCollisionFace::InteriorSurfaceFirst && !linkInterior)) continue; for (j=0; j<3; ++j) diff --git a/code/nel/src/pacs/local_retriever.cpp b/code/nel/src/pacs/local_retriever.cpp index bcfe5d19a..6bde93706 100644 --- a/code/nel/src/pacs/local_retriever.cpp +++ b/code/nel/src/pacs/local_retriever.cpp @@ -95,7 +95,7 @@ const CVector &NLPACS::CLocalRetriever::getStartVector(uint32 chain, sint32 surf const COrderedChain3f &ochain = onLeft ? _FullOrderedChains[_Chains[chain].getSubChains().front()] : _FullOrderedChains[_Chains[chain].getSubChains().back()]; - if (ochain.isForward() && onLeft || !ochain.isForward() && !onLeft) + if (ochain.isForward() == onLeft) return ochain.getVertices().front(); else return ochain.getVertices().back(); @@ -107,7 +107,7 @@ const CVector &NLPACS::CLocalRetriever::getStopVector(uint32 chain, sint32 surfa const COrderedChain3f &ochain = onLeft ? _FullOrderedChains[_Chains[chain].getSubChains().back()] : _FullOrderedChains[_Chains[chain].getSubChains().front()]; - if (ochain.isForward() && onLeft || !ochain.isForward() && !onLeft) + if (ochain.isForward() == onLeft) return ochain.getVertices().back(); else return ochain.getVertices().front(); @@ -525,7 +525,7 @@ void NLPACS::CLocalRetriever::computeLoopsAndTips() nlwarning("loopCloseDistance=%f", loopCloseDistance); nlerror("Couldn't close loop on surface=%d", i); } - else if (best > 1.0e0f && loopCloseDistance < 3.0e-2f || + else if ((best > 1.0e0f && loopCloseDistance < 3.0e-2f) || loopCloseDistance < 1.0e-3f) { break; @@ -1132,8 +1132,8 @@ void NLPACS::CLocalRetriever::retrievePosition(CVector estimated, CCollisionSurf ++stop; // if upper or lower the bounds, do nothing - if (estim.y > vertices[start].y && estim.y > vertices[stop].y || - estim.y < vertices[start].y && estim.y < vertices[stop].y) + if ((estim.y > vertices[start].y && estim.y > vertices[stop].y) || + (estim.y < vertices[start].y && estim.y < vertices[stop].y)) continue; isOnBorder = true; @@ -1306,8 +1306,8 @@ void NLPACS::CLocalRetriever::retrieveAccuratePosition(CVector2s estim, CCollisi ++stop; // if upper or lower the bounds, do nothing - if (estim.y > vertices[start].y && estim.y > vertices[stop].y || - estim.y < vertices[start].y && estim.y < vertices[stop].y) + if ((estim.y > vertices[start].y && estim.y > vertices[stop].y) || + (estim.y < vertices[start].y && estim.y < vertices[stop].y)) continue; onBorder = true; @@ -1839,7 +1839,7 @@ void NLPACS::CLocalRetriever::findPath(const NLPACS::CLocalRetriever::CLocalPosi thisChainId = surface._Chains[loop[loopIndex]].Chain; thisChainForward = (_Chains[thisChainId].getLeft() == surfaceId); - thisOChainIndex = (thisChainForward && forward || !thisChainForward && !forward) ? + thisOChainIndex = (thisChainForward == forward) ? 0 : (sint)_Chains[thisChainId]._SubChains.size()-1; } diff --git a/code/nel/src/sound/simple_source.cpp b/code/nel/src/sound/simple_source.cpp index 4450aa883..a25068400 100644 --- a/code/nel/src/sound/simple_source.cpp +++ b/code/nel/src/sound/simple_source.cpp @@ -30,9 +30,9 @@ namespace NLSOUND { CSimpleSource::CSimpleSource(CSimpleSound *simpleSound, bool spawn, TSpawnEndCallback cb, void *cbUserParam, NL3D::CCluster *cluster) : CSourceCommon(simpleSound, spawn, cb, cbUserParam, cluster), + _SimpleSound(simpleSound), _Track(NULL), - _PlayMuted(false), - _SimpleSound(simpleSound) + _PlayMuted(false) { nlassert(_SimpleSound != 0); From 0e7c1ddfe4e31825373cab70c3be9dc3e14a1ba6 Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 14 May 2010 14:02:43 +0200 Subject: [PATCH 2/2] Fixed: #897 Missing ; after two nlassert calls --- code/ryzom/tools/skill_extractor/skill_extractor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/tools/skill_extractor/skill_extractor.cpp b/code/ryzom/tools/skill_extractor/skill_extractor.cpp index 2010329d4..aa5ea1db1 100644 --- a/code/ryzom/tools/skill_extractor/skill_extractor.cpp +++ b/code/ryzom/tools/skill_extractor/skill_extractor.cpp @@ -363,7 +363,7 @@ sint main( sint argc, char ** argv ) if (its == itSkillEnd) { nlwarning("ERROR : cannot find the parent skill %s for skill %s (skill %u)", (*itSkill).second.ParentSkill.c_str(), (*itSkill).second.SkillName.c_str(), count ); - nlstop(""); + nlstop; } (*itSkill).second.ParentSkillPtr = &((*its).second); (*its).second.Children.push_back(&((*itSkill).second));