From a6bdd4059358ef4ac5ffd487fec344882c7639f4 Mon Sep 17 00:00:00 2001 From: kervala Date: Thu, 23 Sep 2010 13:04:08 +0200 Subject: [PATCH 01/18] Changed: #1096 Build error with gcc (patch provided by abelgar) --- code/ryzom/tools/pd_parser/parse_node.h | 4 ++-- .../tools/translation_tools/extract_bot_names.cpp | 5 +++-- .../translation_tools/extract_new_sheet_names.cpp | 3 ++- code/ryzom/tools/translation_tools/main.cpp | 15 +++++++++------ 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/code/ryzom/tools/pd_parser/parse_node.h b/code/ryzom/tools/pd_parser/parse_node.h index 63f94669f..7b5cb4dbb 100644 --- a/code/ryzom/tools/pd_parser/parse_node.h +++ b/code/ryzom/tools/pd_parser/parse_node.h @@ -689,9 +689,9 @@ public: IsRef(false), IsType(false), IsKey(false), + Id(0), Column(-1), - Columns(-1), - Id(0) + Columns(-1) { } diff --git a/code/ryzom/tools/translation_tools/extract_bot_names.cpp b/code/ryzom/tools/translation_tools/extract_bot_names.cpp index ea0f96747..0bfc6f6dc 100644 --- a/code/ryzom/tools/translation_tools/extract_bot_names.cpp +++ b/code/ryzom/tools/translation_tools/extract_bot_names.cpp @@ -272,8 +272,9 @@ int extractBotNames(int argc, char *argv[]) //------------------------------------------------------------------- // init the sheets CSheetId::init(false); - char *PACKED_SHEETS_NAME = "bin/translation_tools_creature.packed_sheets"; + const string PACKED_SHEETS_NAME = "bin/translation_tools_creature.packed_sheets"; loadForm("creature", PACKED_SHEETS_NAME, Creatures, false, false); + if (Creatures.empty()) { for (uint i=0;i Date: Thu, 23 Sep 2010 13:36:21 +0200 Subject: [PATCH 02/18] Fixed: #1096 Build error with gcc --- code/nel/include/nel/ligo/primitive_utils.h | 7 ++++--- code/ryzom/tools/pd_parser/main.cpp | 10 ++++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/code/nel/include/nel/ligo/primitive_utils.h b/code/nel/include/nel/ligo/primitive_utils.h index ff03a48cc..cc71e2d50 100644 --- a/code/nel/include/nel/ligo/primitive_utils.h +++ b/code/nel/include/nel/ligo/primitive_utils.h @@ -25,6 +25,7 @@ #include "nel/misc/o_xml.h" #include "nel/misc/file.h" #include "nel/misc/path.h" +#include #include #include @@ -151,7 +152,7 @@ public: _CurrentPrim(startPrim) { // mark the root node as non checked - _IndexStack.push_back(~0); + _IndexStack.push_back(std::numeric_limits::max()); } /** Each call to this method will return a primitive pointer that match @@ -162,7 +163,7 @@ public: { while (!_IndexStack.empty()) { - if (_IndexStack.back() == ~0) + if (_IndexStack.back() == std::numeric_limits::max()) { _IndexStack.back() = 0; // we need to check the current node. @@ -178,7 +179,7 @@ public: if (_CurrentPrim->getChild(child, _IndexStack.back()++)) { // go down into this node - _IndexStack.push_back(~0); + _IndexStack.push_back(std::numeric_limits::max()); _CurrentPrim = child; } } diff --git a/code/ryzom/tools/pd_parser/main.cpp b/code/ryzom/tools/pd_parser/main.cpp index 8f375a691..92b8dd4ce 100644 --- a/code/ryzom/tools/pd_parser/main.cpp +++ b/code/ryzom/tools/pd_parser/main.cpp @@ -32,14 +32,16 @@ int main(int argc, char **argv) uint arg; for (arg=1; (sint)arg Date: Thu, 23 Sep 2010 15:08:52 +0200 Subject: [PATCH 03/18] Changed: #825 Remove all warnings when compiling Ryzom (patch provided by abelgar) --- .../client/src/continent_manager_build.cpp | 2 +- .../server/src/ai_data_service/pacs_scan.cpp | 4 +-- .../server/src/ai_service/ai_entity_matrix.h | 4 +-- .../ai_service/ai_entity_physical_inline.h | 6 ++-- .../src/ai_service/ai_generic_fight.cpp | 18 ++++++---- .../server/src/ai_service/ai_profile_npc.cpp | 35 ++++++++++--------- .../server/src/ai_service/alias_tree_owner.h | 8 ++--- .../server/src/ai_service/continent_inline.h | 4 +-- code/ryzom/server/src/ai_service/mirrors.h | 2 +- .../server/src/ai_service/script_compiler.h | 8 ++--- code/ryzom/server/src/ai_service/script_vm.h | 4 +-- .../server/src/ai_service/state_instance.h | 2 +- code/ryzom/server/src/ai_share/ai_actions.h | 2 ++ .../server/src/ai_share/primitive_parser.cpp | 28 +++++++++++++-- code/ryzom/server/src/ai_share/world_map.cpp | 17 ++++++--- code/ryzom/server/src/ai_share/world_map.h | 10 +++--- .../src/gameplay_module_lib/module_parent.h | 4 +-- .../src/pd_lib/db_description_parser.cpp | 4 +++ code/ryzom/server/src/pd_lib/pd_messages.cpp | 4 +++ code/ryzom/server/src/pd_lib/pd_messages.h | 13 ++----- .../ryzom/server/src/pd_lib/pd_server_utils.h | 2 +- code/ryzom/server/src/pd_lib/pd_utils.h | 8 ++--- .../server/src/pd_lib/pds_table_buffer.h | 4 +-- .../server/src/server_share/basic_effect.h | 4 +-- .../src/server_share/msg_brick_service.h | 2 +- .../server/src/server_share/mysql_wrapper.h | 6 ++-- code/ryzom/tools/assoc_mem/brain.cpp | 4 +-- .../csv_transform/csv_transform.cpp | 2 +- .../leveldesign/icon_search/icon_search.cpp | 2 +- .../tools/leveldesign/uni_conv/uni_conv.cpp | 2 ++ code/ryzom/tools/pdr_util/pdr_util.cpp | 4 ++- .../ryzom/tools/server/ai_build_wmap/main.cpp | 19 ++++------ .../packed_world_builder.cpp | 8 +++-- 33 files changed, 142 insertions(+), 104 deletions(-) diff --git a/code/ryzom/client/src/continent_manager_build.cpp b/code/ryzom/client/src/continent_manager_build.cpp index 8d83de984..f1ba08f6e 100644 --- a/code/ryzom/client/src/continent_manager_build.cpp +++ b/code/ryzom/client/src/continent_manager_build.cpp @@ -194,7 +194,7 @@ bool buildLMConts(const std::string &worldSheet, const std::string &primitivesPa // get alias and region name - uint32 alias; + uint32 alias = 0; string primName, primAlias; vGenRes[i]->getPropertyByName("name", primName); diff --git a/code/ryzom/server/src/ai_data_service/pacs_scan.cpp b/code/ryzom/server/src/ai_data_service/pacs_scan.cpp index 6c3d2d79f..e03bd24ec 100644 --- a/code/ryzom/server/src/ai_data_service/pacs_scan.cpp +++ b/code/ryzom/server/src/ai_data_service/pacs_scan.cpp @@ -2130,8 +2130,8 @@ public: { uint8 *linePtr = lineBuffer; uint8 *linePtrHM = lineBufferHM; - uint8 pointBuffer; - uint8 pointBufferHM; + uint8 pointBuffer = 0; + uint8 pointBufferHM = 0; CMapPosition pos(scanpos); diff --git a/code/ryzom/server/src/ai_service/ai_entity_matrix.h b/code/ryzom/server/src/ai_service/ai_entity_matrix.h index 484cfcef7..723f31fd6 100644 --- a/code/ryzom/server/src/ai_service/ai_entity_matrix.h +++ b/code/ryzom/server/src/ai_service/ai_entity_matrix.h @@ -241,12 +241,12 @@ public: { public: inline CCellTblIteratorLinear(): - _matrix(NULL), _tbl(NULL), _x(0), _y(0), _runLengthRemaining(0) + _x(0), _y(0), _matrix(NULL), _tbl(NULL), _runLengthRemaining(0) { } inline CCellTblIteratorLinear(const CAIEntityMatrix *matrix,const CAIEntityMatrixIteratorTblLinear *tbl,const CAIVector &pos): - _matrix(matrix), _tbl(tbl), _x((uint16)pos.x().asInt16Meters()), _y((uint16)pos.y().asInt16Meters()) + _x((uint16)pos.x().asInt16Meters()), _y((uint16)pos.y().asInt16Meters()), _matrix(matrix), _tbl(tbl) { #ifdef NL_DEBUG nlassert(_tbl!=NULL); diff --git a/code/ryzom/server/src/ai_service/ai_entity_physical_inline.h b/code/ryzom/server/src/ai_service/ai_entity_physical_inline.h index fbfbe2439..d14bc5d30 100644 --- a/code/ryzom/server/src/ai_service/ai_entity_physical_inline.h +++ b/code/ryzom/server/src/ai_service/ai_entity_physical_inline.h @@ -41,15 +41,15 @@ inline CAIEntityPhysical::CAIEntityPhysical(CPersistentOfPhysical& owner, TDataSetRow const& entityIndex, NLMISC::CEntityId const& id, float radius, uint32 level, RYAI_MAP_CRUNCH::TAStarFlag const& AStarFlags) : CAIEntity() -, _dataSetRow(entityIndex) -, _pos(entityIndex) , CSpawnable(owner) -, _id(id) +, _pos(entityIndex) +, _dataSetRow(entityIndex) , _Stuned(0) , _Rooted(0) , _Blinded(0) , _Feared(0) //, _UnreachableTarget((CAIEntityPhysical*)NULL) +, _id(id) , _radius(radius) , _food(_radius) , _Level(level) diff --git a/code/ryzom/server/src/ai_service/ai_generic_fight.cpp b/code/ryzom/server/src/ai_service/ai_generic_fight.cpp index 36559f8ad..9b0f94516 100644 --- a/code/ryzom/server/src/ai_service/ai_generic_fight.cpp +++ b/code/ryzom/server/src/ai_service/ai_generic_fight.cpp @@ -67,12 +67,12 @@ void CBotProfileFight::resumeProfile() CBotProfileFight::CBotProfileFight(CProfileOwner* owner, CAIEntityPhysical* ennemy) : CBotProfileFightHeal() -, _Ennemy(ennemy) , _Bot(NLMISC::safe_cast(owner)) +, _Ennemy(ennemy) , _PathPos(NLMISC::safe_cast(owner)->theta()) +, _PathCont(NLMISC::safe_cast(owner)->getAStarFlag()) , _RangeCalculated(false) , _SearchAlternativePath(false) -, _PathCont(NLMISC::safe_cast(owner)->getAStarFlag()) { #ifdef NL_DEBUG_PTR _Bot.setData(this); @@ -226,12 +226,12 @@ void CBotProfileHeal::resumeProfile() CBotProfileHeal::CBotProfileHeal(const TDataSetRow &row, CProfileOwner *owner) : CBotProfileFightHeal() -, _Row(row) , _Bot(NLMISC::safe_cast(owner)) , _PathPos(NLMISC::safe_cast(owner)->theta()) +, _PathCont(NLMISC::safe_cast(owner)->getAStarFlag()) +, _Row(row) , _RangeCalculated(false) , _SearchAlternativePath(false) -, _PathCont(NLMISC::safe_cast(owner)->getAStarFlag()) { } @@ -252,10 +252,10 @@ CBotProfileHeal::~CBotProfileHeal() CBotProfileFlee::CBotProfileFlee(CProfileOwner *owner) : CAIBaseProfile() -, _Bot(NLMISC::safe_cast(owner)) -, _PathPos(NLMISC::safe_cast(owner)->theta()) , _DenyFlags(NLMISC::safe_cast(owner)->getAStarFlag()) +, _PathPos(NLMISC::safe_cast(owner)->theta()) , _fightFleePathContainer(NLMISC::safe_cast(owner)->getAStarFlag()) +, _Bot(NLMISC::safe_cast(owner)) { } @@ -521,14 +521,20 @@ bool CFightOrganizer::reorganizeIteration(CBot* bot) if (!entity->isAlive()) { if (ai_profile_npc_VerboseLog) + { nldebug("Entity %s have aggro for dead entity %s, forgetting it.", spawnBot->getEntityId().toString().c_str(), entity->getEntityId().toString().c_str()); + } + spawnBot->forgetAggroFor(entity->dataSetRow()); continue; } if (!entity->isBotAttackable()) { if (ai_profile_npc_VerboseLog) + { nldebug("Entity %s have aggro for non bot attackable entity %s, forgetting it.", spawnBot->getEntityId().toString().c_str(), entity->getEntityId().toString().c_str()); + } + spawnBot->forgetAggroFor(entity->dataSetRow()); continue; } diff --git a/code/ryzom/server/src/ai_service/ai_profile_npc.cpp b/code/ryzom/server/src/ai_service/ai_profile_npc.cpp index 6ead1f837..a97beb24f 100644 --- a/code/ryzom/server/src/ai_service/ai_profile_npc.cpp +++ b/code/ryzom/server/src/ai_service/ai_profile_npc.cpp @@ -676,7 +676,8 @@ void CGrpProfileBandit::beginProfile() else { // look for aggro range parameter or set a default value - float aggroRangeFloat; + float aggroRangeFloat = 0.f; + if (!_Grp->getProfileParameter("aggro range", aggroRangeFloat)) _AggroRange =static_cast( CGrpProfileBanditFactory::getDefaultBanditAggroRange() ); else @@ -991,7 +992,7 @@ void CGrpProfileGuard::updateProfile(uint ticksSinceLastUpdate) } string s; - float f; + float f = 0.f; if (_Grp->getProfileParameter("faction", s) && !s.empty()) { factionIndex = CStaticFames::getInstance().getFactionIndex(s); @@ -1703,10 +1704,10 @@ CGrpProfileFollowRoute::CGrpProfileFollowRoute(CProfileOwner *owner) CGrpProfileFollowRoute::CGrpProfileFollowRoute(CProfileOwner *owner,const std::vector &geometry,const TVerticalPos &verticalPos, bool dontSendEvent) : CMoveProfile(owner) -, _Geometry(&geometry) -, _GeometryComeFromState(false) -, _VerticalPos(verticalPos) , _PathCont(NLMISC::safe_cast(owner)->getPersistent().getAStarFlag()) +, _GeometryComeFromState(false) +, _Geometry(&geometry) +, _VerticalPos(verticalPos) , _DontSendEvent(dontSendEvent) { PROFILE_LOG("group", "follow_route", "ctor2", ""); @@ -2402,8 +2403,8 @@ std::string CGrpProfileIdle::getOneLineInfoString() const CGrpProfileWander::CGrpProfileWander(CProfileOwner* owner, CNpcZone const* npcZone) : CMoveProfile(owner) -, _NpcZone(npcZone) , _Social(false) +, _NpcZone(npcZone) { PROFILE_LOG("group", "wander", "ctor", ""); _BotStandProfileType = BOT_STAND_AT_POS; @@ -2748,8 +2749,8 @@ std::string CGrpProfileWander::getOneLineInfoString() const CGrpProfileWanderNoPrim::CGrpProfileWanderNoPrim(CProfileOwner* owner, NLMISC::CSmartPtr const& npcZone) : CMoveProfile(owner) -, _NpcZone(npcZone) , _Social(false) +, _NpcZone(npcZone) { PROFILE_LOG("group", "wander", "ctor", ""); _BotStandProfileType = BOT_STAND_AT_POS; @@ -3043,10 +3044,10 @@ CGrpProfileStandAtStartPoint::CBotPositionner::CBotPositionner(RYAI_MAP_CRUNCH:: } CGrpProfileStandAtStartPoint::CBotPositionner::CBotPositionner(TVerticalPos verticalPos, CAIPos position, RYAI_MAP_CRUNCH::TAStarFlag flag) -: _BotAtDest(false) +: _PathCont(flag) , _Position(position) , _VerticalPos(verticalPos) -, _PathCont(flag) +, _BotAtDest(false) { _PathCont.setDestination(verticalPos, position); } @@ -4019,9 +4020,9 @@ CBotProfileMoveTo::CBotProfileMoveTo(AITYPES::TVerticalPos verticalPos, RYAI_MAP : CAIBaseProfile() , _VerticalPos(verticalPos) , _Dest(dest) -, _Bot(NLMISC::safe_cast(owner)) -, _PathPos(NLMISC::safe_cast(owner)->theta()) , _PathCont(NLMISC::safe_cast(owner)->getAStarFlag()) +, _PathPos(NLMISC::safe_cast(owner)->theta()) +, _Bot(NLMISC::safe_cast(owner)) { PROFILE_LOG("bot", "move_to", "ctor", ""); #ifdef NL_DEBUG_PTR @@ -4095,11 +4096,11 @@ std::string CBotProfileMoveTo::getOneLineInfoString() const CBotProfileFollowPos::CBotProfileFollowPos(CBotProfileFollowPos const& other) : CAIBaseProfile() -, _PathCont(const_cast(other)._PathCont) +, _PathPos(const_cast(other)._PathPos._Angle) // Just to debug... , _Bot(const_cast(other)._Bot) +, _PathCont(const_cast(other)._PathCont) , _MaxWalkSpeed(FLT_MAX) , _MaxRunSpeed(FLT_MAX) -, _PathPos(const_cast(other)._PathPos._Angle) // Just to debug... , _Stop(false) { PROFILE_LOG("bot", "follow_pos", "ctor", ""); @@ -4110,11 +4111,11 @@ CBotProfileFollowPos::CBotProfileFollowPos(CBotProfileFollowPos const& other) CBotProfileFollowPos::CBotProfileFollowPos(CPathCont* pathCont, CProfileOwner* owner) : CAIBaseProfile() -, _PathCont(pathCont) +, _PathPos(NLMISC::safe_cast(owner)->theta()) , _Bot(NLMISC::safe_cast(owner)) +, _PathCont(pathCont) , _MaxWalkSpeed(FLT_MAX) , _MaxRunSpeed(FLT_MAX) -, _PathPos(NLMISC::safe_cast(owner)->theta()) , _Stop(false) { PROFILE_LOG("bot", "follow_pos", "ctor", ""); @@ -4530,9 +4531,9 @@ CGrpProfileStandOnVertices::CBotPositionner::CBotPositionner(RYAI_MAP_CRUNCH::TA } CGrpProfileStandOnVertices::CBotPositionner::CBotPositionner(uint32 geomIndex, RYAI_MAP_CRUNCH::TAStarFlag flags) -: _BotAtDest(false) +: _PathCont(flags) , _GeomIndex(geomIndex) -, _PathCont(flags) +, _BotAtDest(false) { } diff --git a/code/ryzom/server/src/ai_service/alias_tree_owner.h b/code/ryzom/server/src/ai_service/alias_tree_owner.h index 5ff125667..493b2ac18 100644 --- a/code/ryzom/server/src/ai_service/alias_tree_owner.h +++ b/code/ryzom/server/src/ai_service/alias_tree_owner.h @@ -143,9 +143,9 @@ bool CAliasTreeOwner::CAliasDiff::operator()(CAliasTreeOwner const* other) const inline CAliasTreeOwner::CAliasTreeOwner(CAIAliasDescriptionNode* aliasTree) -: _AliasTree(aliasTree) -, _Alias(0) +: _Alias(0) , _Name(std::string()) +, _AliasTree(aliasTree) { if (aliasTree) { @@ -159,9 +159,9 @@ CAliasTreeOwner::CAliasTreeOwner(CAIAliasDescriptionNode* aliasTree) inline CAliasTreeOwner::CAliasTreeOwner(uint32 alias, std::string const& name) -: _AliasTree(NULL) -, _Alias(alias) +: _Alias(alias) , _Name(name) +, _AliasTree(NULL) { CAliasTreeOwnerLocator::getInstance()->addEntity(_Alias, _Name, this); } diff --git a/code/ryzom/server/src/ai_service/continent_inline.h b/code/ryzom/server/src/ai_service/continent_inline.h index e38493b23..13c31bca4 100644 --- a/code/ryzom/server/src/ai_service/continent_inline.h +++ b/code/ryzom/server/src/ai_service/continent_inline.h @@ -126,8 +126,8 @@ bool CAICircle::isInside(V const& pos) inline CAabb::CAabb() -: _VMax(INT_MIN/CAICoord::UNITS_PER_METER, INT_MIN/CAICoord::UNITS_PER_METER) -, _VMin(INT_MAX/CAICoord::UNITS_PER_METER, INT_MAX/CAICoord::UNITS_PER_METER) +: _VMin(INT_MAX/CAICoord::UNITS_PER_METER, INT_MAX/CAICoord::UNITS_PER_METER) +, _VMax(INT_MIN/CAICoord::UNITS_PER_METER, INT_MIN/CAICoord::UNITS_PER_METER) { } /* diff --git a/code/ryzom/server/src/ai_service/mirrors.h b/code/ryzom/server/src/ai_service/mirrors.h index 821be189c..3923146ac 100644 --- a/code/ryzom/server/src/ai_service/mirrors.h +++ b/code/ryzom/server/src/ai_service/mirrors.h @@ -50,7 +50,7 @@ public: static bool exists( const TDataSetRow& entityIndex ); static const NLMISC::CEntityId& getEntityId( const TDataSetRow& entityIndex ); static TDataSetRow getDataSetRow( const NLMISC::CEntityId& entityId ); - static const uint16 getTeamId(const TDataSetRow& entityIndex); + static uint16 getTeamId(const TDataSetRow& entityIndex); static CAICoord x( const TDataSetRow& entityIndex ); static CAICoord y( const TDataSetRow& entityIndex ); diff --git a/code/ryzom/server/src/ai_service/script_compiler.h b/code/ryzom/server/src/ai_service/script_compiler.h index 763820da8..4cbf25124 100644 --- a/code/ryzom/server/src/ai_service/script_compiler.h +++ b/code/ryzom/server/src/ai_service/script_compiler.h @@ -344,14 +344,14 @@ CTokenTestResult::CTokenTestResult() } inline CTokenTestResult::CTokenTestResult(const NLMISC::CSmartPtr &codeNode) -: _codeNode(codeNode) -, _res(BRULE_VALID) +: _res(BRULE_VALID) +, _codeNode(codeNode) { } inline CTokenTestResult::CTokenTestResult(const NLMISC::CSmartPtr &codeNode, TBasicTokenTestRes res) -: _codeNode(codeNode) -, _res(res) +: _res(BRULE_VALID) +, _codeNode(codeNode) { } inline diff --git a/code/ryzom/server/src/ai_service/script_vm.h b/code/ryzom/server/src/ai_service/script_vm.h index 17020410c..6fc8a01f1 100644 --- a/code/ryzom/server/src/ai_service/script_vm.h +++ b/code/ryzom/server/src/ai_service/script_vm.h @@ -556,10 +556,10 @@ inline CStringSeparator::CStringSeparator(const std::string &str, const std::string &motif) :_Index(0) ,_NewIndex(0) - ,_Str(str) - ,_Motif(motif) ,_Delta(0) ,_StartIndex(0) + ,_Str(str) + ,_Motif(motif) { } inline diff --git a/code/ryzom/server/src/ai_service/state_instance.h b/code/ryzom/server/src/ai_service/state_instance.h index 054d894c8..2310580e7 100644 --- a/code/ryzom/server/src/ai_service/state_instance.h +++ b/code/ryzom/server/src/ai_service/state_instance.h @@ -583,9 +583,9 @@ void CStateInstance::setNextPunctualState(CAIState* state) inline CPersistentStateInstance::CPersistentStateInstance(CStateMachine& reactionContainer) : CKeyWordOwner() +, CStateInstance(NULL) , _StartState() , _Container(reactionContainer) -, CStateInstance(NULL) { } diff --git a/code/ryzom/server/src/ai_share/ai_actions.h b/code/ryzom/server/src/ai_share/ai_actions.h index 6fb9f0a1d..08fac7b85 100644 --- a/code/ryzom/server/src/ai_share/ai_actions.h +++ b/code/ryzom/server/src/ai_share/ai_actions.h @@ -100,6 +100,7 @@ public: case TypeFloat: return NLMISC::toString(_f); // case TypeAliasTree: return _a->treeToString(); // case TypeEventTree: return _e->toString(); + default: break; } return ""; } @@ -115,6 +116,7 @@ public: case TypeFloat: f.serial(_f); break; // case TypeAliasTree: f.serial(_a); break; // case TypeEventTree: f.serial(_e); break; + default: break; } } diff --git a/code/ryzom/server/src/ai_share/primitive_parser.cpp b/code/ryzom/server/src/ai_share/primitive_parser.cpp index e6ce31008..1ca550ce0 100644 --- a/code/ryzom/server/src/ai_share/primitive_parser.cpp +++ b/code/ryzom/server/src/ai_share/primitive_parser.cpp @@ -1313,7 +1313,7 @@ static void parsePrimGrpFaunaSpawn(const CAIAliasDescriptionNode *treeNode,const // deal with the weight std::string s; - uint32 weight; + uint32 weight = 0; if (prim->getPropertyByName("weight",s)) { weight=atoi(s.c_str()); @@ -2409,7 +2409,9 @@ static void parsePrimDynNpcZoneShape(const CAIAliasDescriptionNode *aliasNode, c static void parsePrimRoadTrigger(const CAIAliasDescriptionNode *aliasNode, const IPrimitive *prim) { CPrimVector t1, t2, sp; - float t1r, t2r, spr; + float t1r = 0.f; + float t2r = 0.f; + float spr = 0.f; string s; for (uint i=0; igetNumChildren(); ++i) @@ -2494,6 +2496,8 @@ static void parsePrimDynRoad(const CAIAliasDescriptionNode *aliasNode, const IPr case AITypeRoadTrigger: parsePrimRoadTrigger(nextTreeNode(aliasNode,child),child); break; + default: + break; } } } @@ -2527,6 +2531,8 @@ static void parsePrimGeomItems(const CAIAliasDescriptionNode *aliasNode, const I case AITypeDynRoad: parsePrimDynRoad(nextTreeNode(aliasNode,child),child); break; + default: + break; } } } @@ -2643,6 +2649,8 @@ static void parsePrimCellZones(const CAIAliasDescriptionNode *aliasNode, const I case AITypeCellZone: parsePrimCellZone(nextTreeNode(aliasNode,child),child); break; + default: + break; } } } @@ -2847,6 +2855,8 @@ static void parsePrimGroupTemplate(const CAIAliasDescriptionNode *aliasNode, con } break; + default: + break; } } @@ -2895,6 +2905,8 @@ static void parsePrimGroupFamilyProfileFaunaContent(const CAIAliasDescriptionNod case AITypeGroupTemplateFauna: parsePrimGroupTemplate(nextTreeNode(aliasNode,child),child,"C"); break; + default: + break; } } @@ -2942,6 +2954,8 @@ static void parsePrimGroupFamilyProfileTribeContent(const CAIAliasDescriptionNod case AITypeGroupTemplateMultiLevel: parsePrimGroupTemplate(nextTreeNode(aliasNode,child),child,"C"); break; + default: + break; } } @@ -2980,6 +2994,8 @@ static void parsePrimGroupFamilyProfileNpcContent(const CAIAliasDescriptionNode case AITypeGroupTemplateMultiLevel: parsePrimGroupTemplate(nextTreeNode(aliasNode,child),child,"C"); break; + default: + break; } } @@ -3047,6 +3063,8 @@ static void parsePrimGroupDescriptions(const CAIAliasDescriptionNode *aliasNode, // case AITypeGroupFamilyProfileGeneric: // parsePrimGroupFamilyProfileGeneric(nextTreeNode(aliasNode,child),child, GroupFamilyTribe); // break; + default: + break; } } } @@ -3354,6 +3372,8 @@ static void parsePrimDynSystem(const IPrimitive *prim, const std::string &mapNam case AITypeOutpost: parsePrimOutpost(child, mapName, filename); break; + default: + break; } } } @@ -3388,6 +3408,8 @@ static void parsePrimNogoPointList(const IPrimitive *prim, const std::string &ma CAIActions::exec("SETNOGO", x, y); } break; + default: + break; } } @@ -4049,7 +4071,7 @@ NLMISC_COMMAND(loadMapsFromCommon,"load all primitive defined in usedPrimitives const vector &basePrim = CPrimitiveCfg::getMap(args[0]); set filter(basePrim.begin(), basePrim.end()); - for ( uint i = 0; (sint)i &prims = CPrimitiveCfg::getMap(usedPrimitives.asString(i)); for (uint j=0; jgetCellLink(*this); } inline -CWorldPosition::CWorldPosition(const CRootCell *cell, const CMapPosition &pos, const CSlot &slot,bool generationOnly) : _RootCell(cell), CMapPosition(pos), CSlot(slot) +CWorldPosition::CWorldPosition(const CRootCell *cell, const CMapPosition &pos, const CSlot &slot,bool generationOnly) : CMapPosition(pos), CSlot(slot), _RootCell(cell) { } diff --git a/code/ryzom/server/src/gameplay_module_lib/module_parent.h b/code/ryzom/server/src/gameplay_module_lib/module_parent.h index 0f6bac511..54f3eeaaf 100644 --- a/code/ryzom/server/src/gameplay_module_lib/module_parent.h +++ b/code/ryzom/server/src/gameplay_module_lib/module_parent.h @@ -23,8 +23,8 @@ #include "module_core.h" #include "module_utils.h" -class ::IModuleCore; -class ::IModule; +class IModuleCore; +class IModule; /** * A module parent is a class encapsulating the modules contained in a module core diff --git a/code/ryzom/server/src/pd_lib/db_description_parser.cpp b/code/ryzom/server/src/pd_lib/db_description_parser.cpp index df3fae778..cc816bcf1 100644 --- a/code/ryzom/server/src/pd_lib/db_description_parser.cpp +++ b/code/ryzom/server/src/pd_lib/db_description_parser.cpp @@ -418,6 +418,8 @@ bool CDBDescriptionParser::loadAttribute(xmlNodePtr node, CTableNode& table) return false; } break; + default: + break; } return true; @@ -727,6 +729,8 @@ bool CDBDescriptionParser::buildColumns(uint tableIndex) table.Columns.push_back(column); } break; + default: + break; } } diff --git a/code/ryzom/server/src/pd_lib/pd_messages.cpp b/code/ryzom/server/src/pd_lib/pd_messages.cpp index df12f3018..db076950e 100644 --- a/code/ryzom/server/src/pd_lib/pd_messages.cpp +++ b/code/ryzom/server/src/pd_lib/pd_messages.cpp @@ -104,6 +104,8 @@ std::string CDbMessage::buildLogString(const CDBDescriptionParser& description) else if (typenode.ByteSize == 4) result += NLMISC::toString(*(uint32*)dataptr); } break; + default: + break; } } } @@ -166,6 +168,8 @@ void CDbMessage::getHRContent(const CDBDescriptionParser& description, std::stri else if (column.ByteSize == 4) strValue = NLMISC::toString(asUint32()); } break; + default: + break; } result = NLMISC::toString("%-12s: ", "UpdateValue"); diff --git a/code/ryzom/server/src/pd_lib/pd_messages.h b/code/ryzom/server/src/pd_lib/pd_messages.h index 30e469d8c..a923809d9 100644 --- a/code/ryzom/server/src/pd_lib/pd_messages.h +++ b/code/ryzom/server/src/pd_lib/pd_messages.h @@ -1016,7 +1016,7 @@ class CUpdateLog { public: - CUpdateLog() : UpdateId(0xffffffff), _Updates(NULL), _OwnUpdates(false) { } + CUpdateLog() : UpdateId(0xffffffff), _OwnUpdates(false), _Updates(NULL) { } ~CUpdateLog(); @@ -1373,12 +1373,6 @@ inline uint32 CDbMessage::getMessageHeaderSize() size += sizeof(_Value3[0]); break; - case AddString: - break; - - case UnmapString: - break; - case ReleaseRow: size += sizeof(_ObjectIndex.Table)+sizeof(_ObjectIndex.Row); break; @@ -1388,10 +1382,7 @@ inline uint32 CDbMessage::getMessageHeaderSize() size += 2; break; - case PushContext: - break; - - case PopContext: + default: break; } diff --git a/code/ryzom/server/src/pd_lib/pd_server_utils.h b/code/ryzom/server/src/pd_lib/pd_server_utils.h index ec1df021a..f1dd71f0e 100644 --- a/code/ryzom/server/src/pd_lib/pd_server_utils.h +++ b/code/ryzom/server/src/pd_lib/pd_server_utils.h @@ -267,7 +267,7 @@ class CMixedStreamFile : public NLMISC::IStream public: /// Constructor - CMixedStreamFile() : _File(NULL), NLMISC::IStream(false) + CMixedStreamFile() : NLMISC::IStream(false), _File(NULL) { } diff --git a/code/ryzom/server/src/pd_lib/pd_utils.h b/code/ryzom/server/src/pd_lib/pd_utils.h index fbb869de6..886d367e5 100644 --- a/code/ryzom/server/src/pd_lib/pd_utils.h +++ b/code/ryzom/server/src/pd_lib/pd_utils.h @@ -157,7 +157,7 @@ class CObjectIndex public: /// Constructor of invalid index - explicit CObjectIndex(bool validateChecksum = false) : _Table(INVALID_TABLE_INDEX), _Row(INVALID_ROW_INDEX), _Checksum((TIndexChecksum)~VALID_INDEX_CHECKSUM) + explicit CObjectIndex(bool validateChecksum = false) : _Row(INVALID_ROW_INDEX), _Table(INVALID_TABLE_INDEX), _Checksum((TIndexChecksum)~VALID_INDEX_CHECKSUM) { if (validateChecksum) validate(); @@ -166,7 +166,7 @@ public: } /// Constructor - CObjectIndex(TTableIndex table, TRowIndex row) : _Table(table), _Row(row) { validate(); } + CObjectIndex(TTableIndex table, TRowIndex row) : _Row(row), _Table(table) { validate(); } /// Constructor CObjectIndex(const CObjectIndex &index) { *this = index; } @@ -397,13 +397,13 @@ public: /// Constructor explicit CColumnIndex(TTableIndex table = INVALID_TABLE_INDEX, TRowIndex row = INVALID_ROW_INDEX, TColumnIndex column = INVALID_COLUMN_INDEX) - : _Table(table), _Row(row), _Column(column) + : _Table(table), _Column(column), _Row(row) { } /// Constructor explicit CColumnIndex(const CObjectIndex& object, TColumnIndex column) - : _Table(INVALID_TABLE_INDEX), _Row(INVALID_ROW_INDEX), _Column(INVALID_COLUMN_INDEX) + : _Table(INVALID_TABLE_INDEX), _Column(INVALID_COLUMN_INDEX), _Row(INVALID_ROW_INDEX) { if (!object.isValid()) return; diff --git a/code/ryzom/server/src/pd_lib/pds_table_buffer.h b/code/ryzom/server/src/pd_lib/pds_table_buffer.h index e74c1e91b..150ac73db 100644 --- a/code/ryzom/server/src/pd_lib/pds_table_buffer.h +++ b/code/ryzom/server/src/pd_lib/pds_table_buffer.h @@ -81,7 +81,7 @@ public: TRowData data() { return (*_MapIt).second + (_Mapped ? sizeof(CMappedHeader) : sizeof(CHeader)); } /// Get row data - const TRowData data() const { return (*_MapIt).second + (_Mapped ? sizeof(CMappedHeader) : sizeof(CHeader)); } + TRowData data() const { return (*_MapIt).second + (_Mapped ? sizeof(CMappedHeader) : sizeof(CHeader)); } /// Default Constructor, should never be used explicit CAccessor() { } @@ -104,7 +104,7 @@ public: uint64 key() const { return mapped() ? ((CMappedHeader*)fullRow())->getKey() : 0; } /// Get Full Row Data - const TRowData fullRow() const { return (*_MapIt).second; } + TRowData fullRow() const { return (*_MapIt).second; } /// Equals diff --git a/code/ryzom/server/src/server_share/basic_effect.h b/code/ryzom/server/src/server_share/basic_effect.h index b7b59c62d..75e6a4803 100644 --- a/code/ryzom/server/src/server_share/basic_effect.h +++ b/code/ryzom/server/src/server_share/basic_effect.h @@ -35,13 +35,13 @@ class CBasicEffect public: /// Constructor CBasicEffect(EFFECT_FAMILIES::TEffectFamily family, const TDataSetRow & creatorId, const TDataSetRow & targetRowId) - : _Family(family), _CreatorRowId(creatorId), _TargetRowId(targetRowId) + : _CreatorRowId(creatorId), _TargetRowId(targetRowId), _Family(family) { _EffectId = ++_EffectCounter; } CBasicEffect( EFFECT_FAMILIES::TEffectFamily family, const TDataSetRow & creatorId, const TDataSetRow & targetRowId, uint32 effectId ) - : _Family(family), _CreatorRowId(creatorId), _TargetRowId(targetRowId), _EffectId(effectId) + : _CreatorRowId(creatorId), _TargetRowId(targetRowId), _Family(family), _EffectId(effectId) { } diff --git a/code/ryzom/server/src/server_share/msg_brick_service.h b/code/ryzom/server/src/server_share/msg_brick_service.h index 59ce7411c..098598647 100644 --- a/code/ryzom/server/src/server_share/msg_brick_service.h +++ b/code/ryzom/server/src/server_share/msg_brick_service.h @@ -119,7 +119,7 @@ public: uint8 Index; // index of the phrase in the player memorized phrase interface if != 0xff - CEGSExecuteMsg() : Index(0xff), Cyclic(false) + CEGSExecuteMsg() : Cyclic(false), Index(0xff) {} virtual void description () diff --git a/code/ryzom/server/src/server_share/mysql_wrapper.h b/code/ryzom/server/src/server_share/mysql_wrapper.h index 81fd9cc71..26fbc924b 100644 --- a/code/ryzom/server/src/server_share/mysql_wrapper.h +++ b/code/ryzom/server/src/server_share/mysql_wrapper.h @@ -121,9 +121,9 @@ namespace MSW CResultBase(MYSQL_RES *result) - : _Result(result), - _CurrentRow(NULL), - _FieldLength(NULL) + : _CurrentRow(NULL), + _FieldLength(NULL), + _Result(result) { } diff --git a/code/ryzom/tools/assoc_mem/brain.cpp b/code/ryzom/tools/assoc_mem/brain.cpp index 74b8a8953..711366043 100644 --- a/code/ryzom/tools/assoc_mem/brain.cpp +++ b/code/ryzom/tools/assoc_mem/brain.cpp @@ -26,7 +26,7 @@ CBrain::CBrain(CMood &personality) : CMood(personality) _UpdateEvery = 0; } -CBrain::CBrain(const CBrain &c) +CBrain::CBrain(const CBrain &c) : CMood() { _Personality = c._Personality; _RealTime = c._RealTime; @@ -152,4 +152,4 @@ void CBrain::addRecord(CRecord *record) _LastUpdate++; if ( _LastUpdate > _UpdateEvery ) build(); -} \ No newline at end of file +} diff --git a/code/ryzom/tools/leveldesign/csv_transform/csv_transform.cpp b/code/ryzom/tools/leveldesign/csv_transform/csv_transform.cpp index 220356c40..41dbc6b28 100644 --- a/code/ryzom/tools/leveldesign/csv_transform/csv_transform.cpp +++ b/code/ryzom/tools/leveldesign/csv_transform/csv_transform.cpp @@ -95,7 +95,7 @@ private: enum { DEFAULT, PARA, HEADER, FOOTER, FILE_HEADER, FILE_FOOTER, TBL, TABTBL, TEXT } mode; public: - CCruncher(): mode(DEFAULT), firstTblLine(true) + CCruncher(): firstTblLine(true), readColumnName(false), mode(DEFAULT) { } diff --git a/code/ryzom/tools/leveldesign/icon_search/icon_search.cpp b/code/ryzom/tools/leveldesign/icon_search/icon_search.cpp index 110f9b7c6..2e95ad694 100644 --- a/code/ryzom/tools/leveldesign/icon_search/icon_search.cpp +++ b/code/ryzom/tools/leveldesign/icon_search/icon_search.cpp @@ -220,7 +220,7 @@ void ProcessDirectory( const CSString& dir, const StringVector& extensions ) sixieme = (int)files.size() / 6; - printf( "%d files are processed", files.size() ); + printf( "%u files are processed", (uint) files.size() ); for (uint32 i=0; isize(); ++i) + for (uint i=0; i < var->size(); ++i) LookupPath.push_back(var->asString(i)); } var = cf.getVarPtr("NoRecursePaths"); if (var != NULL) { - uint i; - for (i=0; (sint)isize(); ++i) + for (uint i=0; i < var->size(); ++i) LookupNoRecursePath.push_back(var->asString(i)); } var = cf.getVarPtr("PacsPrimPaths"); if (var != NULL) { - uint i; - for (i=0; (sint)isize(); ++i) + for (uint i=0; i < var->size(); ++i) PacsPrimPath.push_back(var->asString(i)); } @@ -77,14 +74,12 @@ sint main(sint argc, char **argv) var = cf.getVarPtr("Commands"); if (var != NULL) { - uint i; - for (i=0; (sint)isize(); ++i) + for (uint i=0; i < var->size(); ++i) commands.push_back(var->asString(i)); } - uint i; string cmd; - for (i=1; (sint)i &zoneNames, const { std::vector > zones; zones.reserve(zoneNames.size()); - sint zoneMinX, zoneMaxX; - sint zoneMinY, zoneMaxY; + sint zoneMinX = 0; + sint zoneMaxX = 0; + sint zoneMinY = 0; + sint zoneMaxY = 0; bool firstZoneCorner = true; for(uint k = 0; k < zoneNames.size(); ++k) { @@ -252,7 +254,7 @@ void CPackedWorldBuilder::build(const std::vector &zoneNames, const CIFile f; if (f.open(cacheFilename)) { - CPackedZoneBase *pb; + CPackedZoneBase *pb = NULL; f.serialPolyPtr(pb); packedZoneGrid(x, y) = pb; mustRebuild = false; From 48c3bfaf75fd34470b68452deb5e60b842d0d7a8 Mon Sep 17 00:00:00 2001 From: "acemtp@acemtp-desktop" Date: Thu, 23 Sep 2010 15:47:31 +0200 Subject: [PATCH 04/18] Changed: order of the lib to make it link in static --- code/CMakeModules/FindLibwww.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/CMakeModules/FindLibwww.cmake b/code/CMakeModules/FindLibwww.cmake index a19f9e3a6..3ff51bbc1 100644 --- a/code/CMakeModules/FindLibwww.cmake +++ b/code/CMakeModules/FindLibwww.cmake @@ -70,7 +70,6 @@ ENDMACRO(FIND_WWW_LIBRARY MYLIBRARY) # we need to link them all manually FIND_WWW_LIBRARY(LIBWWWAPP_LIBRARY wwwapp) -FIND_WWW_LIBRARY(LIBWWWCACHE_LIBRARY wwwcache) FIND_WWW_LIBRARY(LIBWWWCORE_LIBRARY wwwcore) FIND_WWW_LIBRARY(LIBWWWDIR_LIBRARY wwwdir) FIND_WWW_LIBRARY(LIBWWWFILE_LIBRARY wwwfile) @@ -80,6 +79,7 @@ FIND_WWW_LIBRARY(LIBWWWHTML_LIBRARY wwwhtml) FIND_WWW_LIBRARY(LIBWWWHTTP_LIBRARY wwwhttp) FIND_WWW_LIBRARY(LIBWWWINIT_LIBRARY wwwinit) FIND_WWW_LIBRARY(LIBWWWMIME_LIBRARY wwwmime) +FIND_WWW_LIBRARY(LIBWWWCACHE_LIBRARY wwwcache) FIND_WWW_LIBRARY(LIBWWWMUX_LIBRARY wwwmux) FIND_WWW_LIBRARY(LIBWWWNEWS_LIBRARY wwwnews) FIND_WWW_LIBRARY(LIBWWWSTREAM_LIBRARY wwwstream) From 0f4fd77f3bc01cb500771eaf4f9e4464b2b48751 Mon Sep 17 00:00:00 2001 From: "acemtp@acemtp-desktop" Date: Thu, 23 Sep 2010 15:48:20 +0200 Subject: [PATCH 05/18] Added: include dir of zlib because game_share need zlib --- code/ryzom/common/src/game_share/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/common/src/game_share/CMakeLists.txt b/code/ryzom/common/src/game_share/CMakeLists.txt index b9c9ec39a..3862fe123 100644 --- a/code/ryzom/common/src/game_share/CMakeLists.txt +++ b/code/ryzom/common/src/game_share/CMakeLists.txt @@ -9,7 +9,7 @@ LIST(REMOVE_ITEM PRIV_H ${CMAKE_CURRENT_SOURCE_DIR}/enum_template.h) NL_TARGET_LIB(ryzom_gameshare ${SRC}) -INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${NEL_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) +INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${NEL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) TARGET_LINK_LIBRARIES(ryzom_gameshare nelmisc nelnet nelligo nelgeorges ${LIBXML2_LIBRARIES} ${ZLIB_LIBRARIES}) NL_DEFAULT_PROPS(ryzom_gameshare "Ryzom, Library: Game Share") NL_ADD_RUNTIME_FLAGS(ryzom_gameshare) From 65a58d76d179e23839f8bd3954ea27646adf6667 Mon Sep 17 00:00:00 2001 From: vl Date: Thu, 23 Sep 2010 15:50:44 +0200 Subject: [PATCH 06/18] Added: case for static version of the driver --- code/nel/src/sound/driver/openal/ext_al.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/nel/src/sound/driver/openal/ext_al.cpp b/code/nel/src/sound/driver/openal/ext_al.cpp index a444fb54a..b3c5cf6aa 100644 --- a/code/nel/src/sound/driver/openal/ext_al.cpp +++ b/code/nel/src/sound/driver/openal/ext_al.cpp @@ -65,7 +65,8 @@ void alExtInitDevice(ALCdevice *device) AlExtXRam = false; } } - + +#ifndef NL_STATIC // EFX if ((AlExtEfx = (alcIsExtensionPresent(device, "ALC_EXT_EFX") == ALC_TRUE)) == true) { @@ -111,6 +112,7 @@ void alExtInitDevice(ALCdevice *device) AlExtEfx = false; } } +#endif } #if EAX_AVAILABLE @@ -134,6 +136,7 @@ EAXGetBufferMode eaxGetBufferMode = NULL; // ALC_EXT_EFX bool AlExtEfx = false; // effect objects +#ifndef NL_STATIC LPALGENEFXOBJECTS alGenEffects = NULL; LPALDELETEEFXOBJECTS alDeleteEffects = NULL; LPALISEFXOBJECT alIsEffect = NULL; @@ -169,7 +172,7 @@ LPALGETEFXOBJECTI alGetAuxiliaryEffectSloti = NULL; LPALGETEFXOBJECTIV alGetAuxiliaryEffectSlotiv = NULL; LPALGETEFXOBJECTF alGetAuxiliaryEffectSlotf = NULL; LPALGETEFXOBJECTFV alGetAuxiliaryEffectSlotfv = NULL; - +#endif } /* end of file */ From 837ab5c68fdc323de6e7a1f1d6fdab388233df4a Mon Sep 17 00:00:00 2001 From: vl Date: Thu, 23 Sep 2010 15:51:24 +0200 Subject: [PATCH 07/18] Added: in static, we don't compile fmod since it only exists in dynlib --- code/nel/src/sound/driver/sound_driver.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/nel/src/sound/driver/sound_driver.cpp b/code/nel/src/sound/driver/sound_driver.cpp index e4bc219b5..f18488779 100644 --- a/code/nel/src/sound/driver/sound_driver.cpp +++ b/code/nel/src/sound/driver/sound_driver.cpp @@ -41,7 +41,11 @@ using namespace NLMISC; # define NL_DSOUND_AVAILABLE 0 # define NL_XAUDIO2_AVAILABLE 0 #elif defined( NL_OS_UNIX ) +#ifdef NL_STATIC +# define NL_FMOD_AVAILABLE 0 +#else # define NL_FMOD_AVAILABLE 1 +#endif # define NL_OPENAL_AVAILABLE 1 # define NL_DSOUND_AVAILABLE 0 # define NL_XAUDIO2_AVAILABLE 0 From 8bde6fa98d8d4d3565f0d4c29cba7a98e84cd79b Mon Sep 17 00:00:00 2001 From: vl Date: Thu, 23 Sep 2010 16:03:49 +0200 Subject: [PATCH 08/18] Fixed: missing endline --- code/ryzom/common/src/game_share/server_edition_module.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/common/src/game_share/server_edition_module.h b/code/ryzom/common/src/game_share/server_edition_module.h index 7627b92e7..e59956484 100644 --- a/code/ryzom/common/src/game_share/server_edition_module.h +++ b/code/ryzom/common/src/game_share/server_edition_module.h @@ -647,4 +647,4 @@ namespace R2 } // namespace R2 -#endif // R2_SERVER_EDITION_MODULE_H \ No newline at end of file +#endif // R2_SERVER_EDITION_MODULE_H From b11891dbc19964cd8a2df06bf558e48b0da9413e Mon Sep 17 00:00:00 2001 From: vl Date: Thu, 23 Sep 2010 16:14:37 +0200 Subject: [PATCH 09/18] Added: in static driver, include ogg vorbis in the ryzom client --- code/ryzom/client/src/CMakeLists.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/code/ryzom/client/src/CMakeLists.txt b/code/ryzom/client/src/CMakeLists.txt index 93e1eb31c..4dfae2dd7 100644 --- a/code/ryzom/client/src/CMakeLists.txt +++ b/code/ryzom/client/src/CMakeLists.txt @@ -78,7 +78,16 @@ TARGET_LINK_LIBRARIES(ryzom_client ${PLATFORM_LINKFLAGS} ${LUABIND_LIBRARIES} ${CURL_LIBRARIES} ${LIBWWW_LIBRARIES} - ${SEVENZIP_LIBRARY}) + ${SEVENZIP_LIBRARY} +) + +IF(WITH_STATIC_DRIVERS) + TARGET_LINK_LIBRARIES(ryzom_client ${PLATFORM_LINKFLAGS} + ${VORBISFILE_LIBRARY} + ${VORBIS_LIBRARY} + ${OGG_LIBRARY} + ) +ENDIF(WITH_STATIC_DRIVERS) IF(NOT APPLE AND NOT WIN32) TARGET_LINK_LIBRARIES(ryzom_client ${X11_LIBRARIES}) From 940de867ee61d0cb7e802787902c8b247606d36f Mon Sep 17 00:00:00 2001 From: kervala Date: Thu, 23 Sep 2010 18:48:04 +0200 Subject: [PATCH 10/18] Fixed: Static sound drivers link to nelsnd_lowlevel --- code/nel/src/sound/driver/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/src/sound/driver/CMakeLists.txt b/code/nel/src/sound/driver/CMakeLists.txt index 1ace250e7..f9b1a42d8 100644 --- a/code/nel/src/sound/driver/CMakeLists.txt +++ b/code/nel/src/sound/driver/CMakeLists.txt @@ -14,7 +14,7 @@ TARGET_LINK_LIBRARIES(nelsnd_lowlevel nelmisc ${VORBIS_LIBRARY} ${VORBISFILE_LIB SET_TARGET_PROPERTIES(nelsnd_lowlevel PROPERTIES LINK_INTERFACE_LIBRARIES "") NL_DEFAULT_PROPS(nelsnd_lowlevel "NeL, Library: Sound Lowlevel") NL_ADD_RUNTIME_FLAGS(nelsnd_lowlevel) -NL_ADD_STATIC_VID_DRIVERS(nelsnd_lowlevel) +NL_ADD_STATIC_SND_DRIVERS(nelsnd_lowlevel) NL_ADD_LIB_SUFFIX(nelsnd_lowlevel) From a69f0050b67629373cf73f9b320b6ac93e5fad73 Mon Sep 17 00:00:00 2001 From: kervala Date: Thu, 23 Sep 2010 19:29:14 +0200 Subject: [PATCH 11/18] Changed: Removed "using namespace" from *.h --- code/nel/include/nel/net/message_recorder.h | 9 +++------ .../client/src/interface_v3/chat_displayer.h | 7 ++----- .../pvp_faction_reward_manager.cpp | 4 ++-- .../pvp_faction_reward_manager.h | 19 ++++++++----------- .../src/frontend_service/client_host.cpp | 1 + .../server/src/frontend_service/client_host.h | 12 ++++++------ .../frontend_service/distance_prioritizer.cpp | 1 + .../src/frontend_service/fe_receive_sub.h | 5 ++--- .../src/frontend_service/fe_receive_task.h | 7 +++---- .../src/frontend_service/frontend_service.cpp | 1 + .../frontend_service/processing_spreader.cpp | 2 +- 11 files changed, 30 insertions(+), 38 deletions(-) diff --git a/code/nel/include/nel/net/message_recorder.h b/code/nel/include/nel/net/message_recorder.h index c3a57c5f6..dfebb835f 100644 --- a/code/nel/include/nel/net/message_recorder.h +++ b/code/nel/include/nel/net/message_recorder.h @@ -28,9 +28,6 @@ #include #include -using namespace std; - - namespace NLNET { @@ -41,10 +38,10 @@ enum TNetworkEvent { Sending, Receiving, Connecting, ConnFailing, Accepting, Dis /// TNetworkEvent -> string -string EventToString( TNetworkEvent e ); +std::string EventToString( TNetworkEvent e ); /// string -> TNetworkEvent -TNetworkEvent StringToEvent( string& s ); +TNetworkEvent StringToEvent( std::string& s ); /* @@ -65,7 +62,7 @@ struct TMessageRecord nlassert( stream.stringMode() ); uint32 len; - string s_event; + std::string s_event; stream.serial( UpdateCounter ); if ( stream.isReading() ) { diff --git a/code/ryzom/client/src/interface_v3/chat_displayer.h b/code/ryzom/client/src/interface_v3/chat_displayer.h index 770fd8ea9..9c8120223 100644 --- a/code/ryzom/client/src/interface_v3/chat_displayer.h +++ b/code/ryzom/client/src/interface_v3/chat_displayer.h @@ -25,9 +25,6 @@ #include "nel/misc/mutex.h" -using namespace std; -using namespace NLMISC; - /** * class used to display console text commands in the chat window * \author Nicolas Brigand @@ -57,8 +54,8 @@ public: /// Display the string to the chat window virtual void doDisplay ( const NLMISC::CLog::TDisplayInfo& args, const char *message ) { - string temp = message; - string str; + std::string temp = message; + std::string str; CInterfaceManager::TSystemInfoMode mode; if (args.LogType == NLMISC::CLog::LOG_ERROR) { diff --git a/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/pvp_faction_reward_manager.cpp b/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/pvp_faction_reward_manager.cpp index 1099b247e..cca91c289 100644 --- a/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/pvp_faction_reward_manager.cpp +++ b/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/pvp_faction_reward_manager.cpp @@ -30,7 +30,7 @@ #include "phrase_manager/phrase_utilities_functions.h" //#include "creature_manager/creature_manager.h" - +using namespace std; using namespace EFFECT_FAMILIES; using namespace NLLIGO; using namespace NLMISC; @@ -66,7 +66,7 @@ CPVPFactionRewardManager::CPVPFactionRewardManager() //---------------------------------------------------------------------------- void CPVPFactionRewardManager::_BuildTotemBasesRec( const IPrimitive* prim, - map >& neighboursNames, + std::map >& neighboursNames, map& totemBasesPerName ) { if ( !prim ) diff --git a/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/pvp_faction_reward_manager.h b/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/pvp_faction_reward_manager.h index 80c28a7a8..bfb1b1a5a 100644 --- a/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/pvp_faction_reward_manager.h +++ b/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/pvp_faction_reward_manager.h @@ -22,9 +22,6 @@ #include "nel/ligo/primitive.h" #include "game_share/effect_families.h" -using namespace std; -using namespace EFFECT_FAMILIES; - class CCharacter; class CSEffect; class CTotemBase; @@ -52,7 +49,7 @@ class CPVPFactionRewardManager { DECLARE_PERSISTENCE_METHODS public : - typedef vector TPossessionsPerEffect; + typedef std::vector TPossessionsPerEffect; /// Totems levels with the number of totems needed to reach them enum TotemLevel @@ -65,7 +62,7 @@ public : }; /// Values of each effects - static sint32 EffectValues[ EndTotemEffects+1 ]; + static sint32 EffectValues[ EFFECT_FAMILIES::EndTotemEffects+1 ]; /// Returns the totem base for a given region using its ID const CTotemBase* getTotemBaseFromId( uint16 regionId ) { return _GetTotemBaseFromId( regionId ); } @@ -91,12 +88,12 @@ private : /// Get the effects a character would get on a totem void _GetTotemsEffectsRec( CCharacter* user, CTotemBase* pTotem, - vector& outEffects, vector& processed ); + std::vector& outEffects, std::vector& processed ); /// Remove all totem effects from a given player void _removeTotemsEffects( CCharacter* user ); /// Totem bases sorted by region - map _TotemBasesPerRegion; + std::map _TotemBasesPerRegion; /// Number of totems uint32 _NbTotems; @@ -106,8 +103,8 @@ private : /// Build the totem bases using the a LIGO primitive void _BuildTotemBasesRec( const NLLIGO::IPrimitive* prim, - map >& neighboursNames, - map& totemBasesPerName ); + std::map >& neighboursNames, + std::map& totemBasesPerName ); /// Have the totem bases been setup ? bool _InitDone; @@ -146,7 +143,7 @@ public : bool destroyTotem( uint16 regionIndex, TDataSetRow killerRowId ); /// Get the list of reward effects for a character depending on its coordinates - vector getTotemsEffects( CCharacter* user, std::vector& processed ); + std::vector getTotemsEffects( CCharacter* user, std::vector& processed ); /// Give totem rewards to a player void giveTotemsEffects( CCharacter* user ); @@ -176,7 +173,7 @@ public : PVP_CLAN::TPVPClan getRegionOwner( uint16 regionId ); /// send event message to ai - void sendEventToAI( const CTotemBase * totem, const string& event ); + void sendEventToAI( const CTotemBase * totem, const std::string& event ); /// send message when spire is attacked void spireAttacked( CCharacter * actor, CCreature * spire ); diff --git a/code/ryzom/server/src/frontend_service/client_host.cpp b/code/ryzom/server/src/frontend_service/client_host.cpp index 364e840fb..86bba619f 100644 --- a/code/ryzom/server/src/frontend_service/client_host.cpp +++ b/code/ryzom/server/src/frontend_service/client_host.cpp @@ -26,6 +26,7 @@ #include "id_impulsions.h" #include "uid_impulsions.h" +using namespace std; using namespace NLMISC; using namespace CLFECOMMON; diff --git a/code/ryzom/server/src/frontend_service/client_host.h b/code/ryzom/server/src/frontend_service/client_host.h index a8e377a29..9f2f22442 100644 --- a/code/ryzom/server/src/frontend_service/client_host.h +++ b/code/ryzom/server/src/frontend_service/client_host.h @@ -317,7 +317,7 @@ public: /// Return the current maximum number of bits that can fit in the outbox sint32 getCurrentThrottle() const { - return min( (sint32)(_MaxOutboxSizeInBit*2-_BitBandwidthUsageAvg), (sint32)(_MaxOutboxSizeInBit*3/2) ); + return std::min( (sint32)(_MaxOutboxSizeInBit*2-_BitBandwidthUsageAvg), (sint32)(_MaxOutboxSizeInBit*3/2) ); } /// Update the average bits filled that determine the throttle @@ -364,7 +364,7 @@ public: if ( _BitImpulsionUsageAvg < nominalBitSize ) availBitsize = nominalBitSize; else - availBitsize = max( (sint32)0, nominalBitSize*2 - _BitImpulsionUsageAvg ); + availBitsize = std::max( (sint32)0, nominalBitSize*2 - _BitImpulsionUsageAvg ); CMirrorPropValue availableImpulseBitsize( TheDataset, _EntityIndex, DSFirstPropertyAvailableImpulseBitSize ); #ifdef NL_DEBUG @@ -402,16 +402,16 @@ public: TUid Uid; /// User name (put on the NeL Launcher, transmitted by the login system) - string UserName; + std::string UserName; /// User privilege (put on the NeL Launcher, transmitted by the login system) - string UserPriv; + std::string UserPriv; /// User extended data (put on the NeL Launcher, transmitted by the login system) - string UserExtended; + std::string UserExtended; /// Language Id - string LanguageId; + std::string LanguageId; /// Login cookie NLNET::CLoginCookie LoginCookie; diff --git a/code/ryzom/server/src/frontend_service/distance_prioritizer.cpp b/code/ryzom/server/src/frontend_service/distance_prioritizer.cpp index d71e60e0f..3c1e17f17 100644 --- a/code/ryzom/server/src/frontend_service/distance_prioritizer.cpp +++ b/code/ryzom/server/src/frontend_service/distance_prioritizer.cpp @@ -32,6 +32,7 @@ #include #endif +using namespace std; using namespace CLFECOMMON; using namespace NLMISC; using namespace NLNET; diff --git a/code/ryzom/server/src/frontend_service/fe_receive_sub.h b/code/ryzom/server/src/frontend_service/fe_receive_sub.h index d811ec74f..2792f42c5 100644 --- a/code/ryzom/server/src/frontend_service/fe_receive_sub.h +++ b/code/ryzom/server/src/frontend_service/fe_receive_sub.h @@ -30,7 +30,6 @@ #include "client_id_lookup.h" #include -using namespace std; extern bool verbosePacketLost; @@ -55,7 +54,7 @@ typedef std::list< std::pair > TClientsToRemove; enum TBadMessageFormatType { InsufficientSize=1, NotSystemLoginCode=2, BadCookie=4, BadSystemCode=8, HackedSizeInBuffer=16, AccessClosed=32, IrrelevantSystemMessage=64, MalformedAction=128, UnknownExceptionType=256, UnknownFormatType=512, UnauthorizedCharacterSlot=1024 }; /// Return the string for the message invalidity reasons -string getBadMessageString( uint32 reasons ); +std::string getBadMessageString( uint32 reasons ); /// Hacking description struct THackingDesc @@ -121,7 +120,7 @@ public: void release(); /// Add client - CClientHost *addClient( const NLNET::CInetAddress& addrfrom, TUid userId, const string &userName, const string &userPriv, const std::string & userExtended, const std::string & languageId, const NLNET::CLoginCookie &cookie, uint32 instanceId, uint8 authorisedCharSlot, bool sendCLConnect=true ); + CClientHost *addClient( const NLNET::CInetAddress& addrfrom, TUid userId, const std::string &userName, const std::string &userPriv, const std::string & userExtended, const std::string & languageId, const NLNET::CLoginCookie &cookie, uint32 instanceId, uint8 authorisedCharSlot, bool sendCLConnect=true ); /// Add to the list of clients which will be removed by addr at the three cycles later (leaving the time to send an impulsion to the client) void addToRemoveList( TClientId clientid ) { _ClientsToRemove.push_back( std::make_pair(clientid,3) ); } diff --git a/code/ryzom/server/src/frontend_service/fe_receive_task.h b/code/ryzom/server/src/frontend_service/fe_receive_task.h index 2eb31abed..093f7379f 100644 --- a/code/ryzom/server/src/frontend_service/fe_receive_task.h +++ b/code/ryzom/server/src/frontend_service/fe_receive_task.h @@ -30,7 +30,6 @@ #include "nel/net/udp_sock.h" #include -using namespace std; const uint32 MsgHeaderSize = 1; @@ -72,12 +71,12 @@ struct TReceivedMessage uint32 userSize() { return (uint32)_Data.size() - MsgHeaderSize; } /// Return the data vector (event type header byte + user data) - vector& data() { return _Data; } + std::vector& data() { return _Data; } private: /// One byte for event type (header), followed by user data - vector _Data; + std::vector _Data; public: @@ -85,7 +84,7 @@ public: NLNET::CInetAddress AddrFrom; /// Placeholder vector for address info - vector VAddrFrom; + std::vector VAddrFrom; }; diff --git a/code/ryzom/server/src/frontend_service/frontend_service.cpp b/code/ryzom/server/src/frontend_service/frontend_service.cpp index af27047b2..9b2ea65eb 100644 --- a/code/ryzom/server/src/frontend_service/frontend_service.cpp +++ b/code/ryzom/server/src/frontend_service/frontend_service.cpp @@ -61,6 +61,7 @@ # include #endif // NL_OS_WINDOWS +using namespace std; using namespace NLNET; using namespace NLMISC; using namespace CLFECOMMON; diff --git a/code/ryzom/server/src/frontend_service/processing_spreader.cpp b/code/ryzom/server/src/frontend_service/processing_spreader.cpp index 6c442a14e..448fe1135 100644 --- a/code/ryzom/server/src/frontend_service/processing_spreader.cpp +++ b/code/ryzom/server/src/frontend_service/processing_spreader.cpp @@ -83,7 +83,7 @@ void CProcessingSpreader::getProcessingBounds( THostMap::iterator& firstit, sint } sint maxNbClientsProcessedPerTick = MaxNbClients / ExecutionPeriod; - outerboundindex = firstindex + min( maxNbClientsProcessedPerTick, nbClients - firstindex ); + outerboundindex = firstindex + std::min( maxNbClientsProcessedPerTick, nbClients - firstindex ); _ClientMapIndex = outerboundindex; } From abd1827468868935e93220a059c5be08227a4380 Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 24 Sep 2010 09:12:37 +0200 Subject: [PATCH 12/18] Fixed: ryzom_ai_service compilation --- code/ryzom/server/src/ai_service/mirrors.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/server/src/ai_service/mirrors.cpp b/code/ryzom/server/src/ai_service/mirrors.cpp index 6f6705216..15df19c17 100644 --- a/code/ryzom/server/src/ai_service/mirrors.cpp +++ b/code/ryzom/server/src/ai_service/mirrors.cpp @@ -494,7 +494,7 @@ TDataSetRow CMirrors::getDataSetRow( const NLMISC::CEntityId& entityId ) return DataSet->getDataSetRow( entityId ); } -const uint16 CMirrors::getTeamId(const TDataSetRow& entityIndex) +uint16 CMirrors::getTeamId(const TDataSetRow& entityIndex) { CMirrorPropValueRO value( *DataSet, entityIndex, DSPropertyTEAM_ID ); // if ( value()==0 ) From 0c00af96a576eb984af9eb4efa5f223519fdcdec Mon Sep 17 00:00:00 2001 From: vl Date: Fri, 24 Sep 2010 10:27:31 +0200 Subject: [PATCH 13/18] Removed: sound lib inclusion --- code/ryzom/client/src/CMakeLists.txt | 8 -------- 1 file changed, 8 deletions(-) diff --git a/code/ryzom/client/src/CMakeLists.txt b/code/ryzom/client/src/CMakeLists.txt index 4dfae2dd7..f8e7eef4b 100644 --- a/code/ryzom/client/src/CMakeLists.txt +++ b/code/ryzom/client/src/CMakeLists.txt @@ -81,14 +81,6 @@ TARGET_LINK_LIBRARIES(ryzom_client ${PLATFORM_LINKFLAGS} ${SEVENZIP_LIBRARY} ) -IF(WITH_STATIC_DRIVERS) - TARGET_LINK_LIBRARIES(ryzom_client ${PLATFORM_LINKFLAGS} - ${VORBISFILE_LIBRARY} - ${VORBIS_LIBRARY} - ${OGG_LIBRARY} - ) -ENDIF(WITH_STATIC_DRIVERS) - IF(NOT APPLE AND NOT WIN32) TARGET_LINK_LIBRARIES(ryzom_client ${X11_LIBRARIES}) ENDIF(NOT APPLE AND NOT WIN32) From f9903f46dea0aabf4f0f03edecc3aa83fee36244 Mon Sep 17 00:00:00 2001 From: vl Date: Fri, 24 Sep 2010 10:29:06 +0200 Subject: [PATCH 14/18] Changed: ogg vorbis lib order --- code/nel/src/sound/driver/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/nel/src/sound/driver/CMakeLists.txt b/code/nel/src/sound/driver/CMakeLists.txt index f9b1a42d8..f52332aa5 100644 --- a/code/nel/src/sound/driver/CMakeLists.txt +++ b/code/nel/src/sound/driver/CMakeLists.txt @@ -3,14 +3,15 @@ FILE(GLOB HEADERS ../../../include/nel/sound/driver/*.h) NL_TARGET_LIB(nelsnd_lowlevel ${HEADERS} ${SRC}) +INCLUDE_DIRECTORIES(${OGG_INCLUDE_DIR} ${VORBIS_INCLUDE_DIR}) + +TARGET_LINK_LIBRARIES(nelsnd_lowlevel nelmisc ${VORBISFILE_LIBRARY} ${VORBIS_LIBRARY}) IF(WITH_STATIC) # Add libogg dependency only if target is static because to libvorbisfile TARGET_LINK_LIBRARIES(nelsnd_lowlevel ${OGG_LIBRARY}) ENDIF(WITH_STATIC) -INCLUDE_DIRECTORIES(${OGG_INCLUDE_DIR} ${VORBIS_INCLUDE_DIR}) -TARGET_LINK_LIBRARIES(nelsnd_lowlevel nelmisc ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY}) SET_TARGET_PROPERTIES(nelsnd_lowlevel PROPERTIES LINK_INTERFACE_LIBRARIES "") NL_DEFAULT_PROPS(nelsnd_lowlevel "NeL, Library: Sound Lowlevel") NL_ADD_RUNTIME_FLAGS(nelsnd_lowlevel) From 2ac36f839c411c268e8d20f19a6bdefc5b91b8c4 Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 24 Sep 2010 10:52:29 +0200 Subject: [PATCH 15/18] Fixed: optional OpenSSL only when building in static (curl could need it) --- code/ryzom/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/CMakeLists.txt b/code/ryzom/CMakeLists.txt index ec381e5da..69b413426 100644 --- a/code/ryzom/CMakeLists.txt +++ b/code/ryzom/CMakeLists.txt @@ -8,7 +8,6 @@ ELSE(WITH_LUA51) ENDIF(WITH_LUA51) FIND_PACKAGE(Luabind REQUIRED) FIND_PACKAGE(CURL REQUIRED) -FIND_PACKAGE(OpenSSL REQUIRED) FIND_PACKAGE(Libwww) FIND_PACKAGE(ZLIB) IF(NOT WIN32 AND NOT APPLE) @@ -26,6 +25,7 @@ IF(NOT WIN32) ENDIF(NOT WIN32) IF(WITH_STATIC) + FIND_PACKAGE(OpenSSL) SET(CURL_LIBRARIES ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES}) SET(CURL_DEFINITIONS -DCURL_STATICLIB) ENDIF(WITH_STATIC) From 7521923c95000dd6b7815b2d4190d05660555fd3 Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 24 Sep 2010 11:03:56 +0200 Subject: [PATCH 16/18] Changed: #825 Remove all warnings when compiling Ryzom --- code/nel/include/nel/georges/u_form_elm.h | 1 + code/nel/samples/misc/types_check/main.cpp | 1 - code/ryzom/client/src/interface_v3/view_renderer.cpp | 2 +- code/ryzom/client/src/login_patch.h | 2 +- code/ryzom/server/src/server_share/basic_effect.h | 2 +- code/ryzom/tools/leveldesign/prim_export/main.cpp | 2 +- code/ryzom/tools/server/build_world_packed_col/village.cpp | 7 +++---- 7 files changed, 8 insertions(+), 9 deletions(-) diff --git a/code/nel/include/nel/georges/u_form_elm.h b/code/nel/include/nel/georges/u_form_elm.h index dd72487e2..27080b7cf 100644 --- a/code/nel/include/nel/georges/u_form_elm.h +++ b/code/nel/include/nel/georges/u_form_elm.h @@ -226,6 +226,7 @@ public: /// Returns the type of the atom. NULL otherwise. virtual const class UType *getType () = 0; + /// Return true if the element is an atom virtual bool isAtom () const = 0; diff --git a/code/nel/samples/misc/types_check/main.cpp b/code/nel/samples/misc/types_check/main.cpp index 6266765a5..3ad93b8b0 100644 --- a/code/nel/samples/misc/types_check/main.cpp +++ b/code/nel/samples/misc/types_check/main.cpp @@ -66,7 +66,6 @@ template bool check (T value) void checkInts () { - checkInt (uint8, 0, 255, 1); checkInt (sint8, -128, 127, 1); diff --git a/code/ryzom/client/src/interface_v3/view_renderer.cpp b/code/ryzom/client/src/interface_v3/view_renderer.cpp index 490c63399..17bfa99a3 100644 --- a/code/ryzom/client/src/interface_v3/view_renderer.cpp +++ b/code/ryzom/client/src/interface_v3/view_renderer.cpp @@ -553,7 +553,7 @@ void CViewRenderer::drawQuad(sint layerId, const NLMISC::CQuadUV &quadUV, sint32 { // Partially clipped (slowest case) // Must do the clip manually - const uint maxNumCorners = 8; + static const uint maxNumCorners = 8; // static CVector outPos0[maxNumCorners]; static CUV outUV0[maxNumCorners]; diff --git a/code/ryzom/client/src/login_patch.h b/code/ryzom/client/src/login_patch.h index 162765fc9..3e6abc8cf 100644 --- a/code/ryzom/client/src/login_patch.h +++ b/code/ryzom/client/src/login_patch.h @@ -612,4 +612,4 @@ private: #endif // CL_PATCH_H -/* End of login_patch.h */ \ No newline at end of file +/* End of login_patch.h */ diff --git a/code/ryzom/server/src/server_share/basic_effect.h b/code/ryzom/server/src/server_share/basic_effect.h index 75e6a4803..15feb95d4 100644 --- a/code/ryzom/server/src/server_share/basic_effect.h +++ b/code/ryzom/server/src/server_share/basic_effect.h @@ -35,7 +35,7 @@ class CBasicEffect public: /// Constructor CBasicEffect(EFFECT_FAMILIES::TEffectFamily family, const TDataSetRow & creatorId, const TDataSetRow & targetRowId) - : _CreatorRowId(creatorId), _TargetRowId(targetRowId), _Family(family) + : _CreatorRowId(creatorId), _TargetRowId(targetRowId), _Family(family), _EffectId(0) { _EffectId = ++_EffectCounter; } diff --git a/code/ryzom/tools/leveldesign/prim_export/main.cpp b/code/ryzom/tools/leveldesign/prim_export/main.cpp index 4e96e30f4..44f377575 100644 --- a/code/ryzom/tools/leveldesign/prim_export/main.cpp +++ b/code/ryzom/tools/leveldesign/prim_export/main.cpp @@ -77,7 +77,7 @@ using namespace NLLIGO; #define BAR_LENGTH 21 -char *progressbar[BAR_LENGTH]= +const char *progressbar[BAR_LENGTH]= { "[ ]", "[. ]", diff --git a/code/ryzom/tools/server/build_world_packed_col/village.cpp b/code/ryzom/tools/server/build_world_packed_col/village.cpp index 01cd37c7d..d4495a9d9 100644 --- a/code/ryzom/tools/server/build_world_packed_col/village.cpp +++ b/code/ryzom/tools/server/build_world_packed_col/village.cpp @@ -14,7 +14,8 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -/*#include "std_header.h" +#if 0 +#include "std_header.h" // #include "village.h" #include "zone_util.h" @@ -300,6 +301,4 @@ void CIGInfo::load(TShapeCache &shapeCache) } } - - -*/ \ No newline at end of file +#endif From c53f0b1b48819bbcd427e461edf75cc7d38ca43d Mon Sep 17 00:00:00 2001 From: vl Date: Fri, 24 Sep 2010 11:32:20 +0200 Subject: [PATCH 17/18] Added: special case of rgba.cpp on static --- code/nel/src/misc/CMakeLists.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/code/nel/src/misc/CMakeLists.txt b/code/nel/src/misc/CMakeLists.txt index 1710e5b6b..f7a907d91 100644 --- a/code/nel/src/misc/CMakeLists.txt +++ b/code/nel/src/misc/CMakeLists.txt @@ -48,8 +48,16 @@ NL_ADD_LIB_SUFFIX(nelmisc) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) -IF(WITH_PCH) - ADD_NATIVE_PRECOMPILED_HEADER(nelmisc ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.h ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.cpp) +IF(WITH_STATIC) +# acemtp: it's because my gcc is too old and cannot optimize this file +# on old gcc used to compile static ryzom, if you compile rgba with full optim, there's a visual bug (blue people) +SET_SOURCE_FILES_PROPERTIES(rgba.cpp PROPERTIES COMPILE_FLAGS "-O0") +ENDIF(WITH_STATIC) + +IF(WITH_PCH AND NOT WITH_STATIC) +# acemtp: it's because my gcc is too old and cannot optimize this file +# removed the pch or we cannot define -O0 for the rgba specificaly +ADD_NATIVE_PRECOMPILED_HEADER(nelmisc ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.h ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.cpp) ENDIF(WITH_PCH) NL_GEN_PC(nel-misc.pc) From 45eb6f48c77aa4804867873ce901108e0ad56a5d Mon Sep 17 00:00:00 2001 From: vl Date: Fri, 24 Sep 2010 14:50:50 +0200 Subject: [PATCH 18/18] Changed: include ssl only if the lib is found --- code/ryzom/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/ryzom/CMakeLists.txt b/code/ryzom/CMakeLists.txt index 69b413426..6c74161c3 100644 --- a/code/ryzom/CMakeLists.txt +++ b/code/ryzom/CMakeLists.txt @@ -25,8 +25,10 @@ IF(NOT WIN32) ENDIF(NOT WIN32) IF(WITH_STATIC) - FIND_PACKAGE(OpenSSL) - SET(CURL_LIBRARIES ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES}) + FIND_PACKAGE(OpenSSL QUIET) + IF(OPENSSL_FOUND) + SET(CURL_LIBRARIES ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES}) + ENDIF(OPENSSL_FOUND) SET(CURL_DEFINITIONS -DCURL_STATICLIB) ENDIF(WITH_STATIC)