From ea28199136ce512c3ac6c85cbb3ab66ff925922f Mon Sep 17 00:00:00 2001 From: thorbjorn Date: Sat, 8 May 2010 23:27:35 +0200 Subject: [PATCH] Fixed: Compile fixes for gcc 4.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Example: error: cannot call constructor ‘std::pair, CInterfaceDDX*>::pair’ directly error: for a function-style cast, remove the redundant ‘::pair’ --- .../animation_set_list_sheet.cpp | 2 +- code/ryzom/client/src/connection.cpp | 14 +++--- .../client/src/entity_animation_manager.cpp | 2 +- .../client/src/interface_v3/interface_ddx.cpp | 2 +- .../src/interface_v3/interface_parser.cpp | 2 +- .../src/interface_v3/inventory_manager.cpp | 10 ++--- .../client/src/interface_v3/macrocmd_key.cpp | 14 +++--- .../client/src/interface_v3/people_list.cpp | 8 ++-- code/ryzom/client/src/login.cpp | 44 +++++++++---------- 9 files changed, 49 insertions(+), 49 deletions(-) diff --git a/code/ryzom/client/src/client_sheets/animation_set_list_sheet.cpp b/code/ryzom/client/src/client_sheets/animation_set_list_sheet.cpp index 3e43bab20..9361e03be 100644 --- a/code/ryzom/client/src/client_sheets/animation_set_list_sheet.cpp +++ b/code/ryzom/client/src/client_sheets/animation_set_list_sheet.cpp @@ -493,7 +493,7 @@ void CAnimationStateSheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStrea // update statics maps if (f.isReading()) { - _StringToAnimStateId.insert(pair::pair(sStateName, (TAnimStateSheetId)State)); + _StringToAnimStateId.insert(pair(sStateName, (TAnimStateSheetId)State)); if (_AnimStateIdToString.size() <= State) _AnimStateIdToString.resize(State+1); _AnimStateIdToString[State] = sStateName; diff --git a/code/ryzom/client/src/connection.cpp b/code/ryzom/client/src/connection.cpp index dea96674c..9fb943601 100644 --- a/code/ryzom/client/src/connection.cpp +++ b/code/ryzom/client/src/connection.cpp @@ -2118,9 +2118,9 @@ public: { vector< pair < string, string > > params; params.clear(); - params.push_back(pair::pair("id", toString(Mainlands[i].Id))); + params.push_back(pair("id", toString(Mainlands[i].Id))); if (i>0) - params.push_back(pair::pair("posref", "BL TL")); + params.push_back(pair("posref", "BL TL")); CInterfaceGroup *pNewLine =pIM->createGroupInstance("t_mainland", GROUP_LIST_MAINLAND, params); if (pNewLine != NULL) @@ -2240,10 +2240,10 @@ public: { vector< pair < string, string > > params; params.clear(); - params.push_back(pair::pair("id", id)); + params.push_back(pair("id", id)); if (!First) { - params.push_back(pair::pair("posref", "BL TL")); + params.push_back(pair("posref", "BL TL")); } First = false; CInterfaceManager *pIM = CInterfaceManager::getInstance(); @@ -2712,9 +2712,9 @@ class CAHScenarioControl : public IActionHandler { vector< pair < string, string > > params; params.clear(); - params.push_back(pair::pair("id", toString(Mainlands[i].Id))); - params.push_back(pair::pair("w", "1024")); - params.push_back(pair::pair("tooltip", "uiRingFilterShard")); + params.push_back(pair("id", toString(Mainlands[i].Id))); + params.push_back(pair("w", "1024")); + params.push_back(pair("tooltip", "uiRingFilterShard")); CInterfaceGroup *toggleGr =pIM->createGroupInstance("label_toggle_button", shardList->getId(), params); shardList->addChild(toggleGr); // set unicode name diff --git a/code/ryzom/client/src/entity_animation_manager.cpp b/code/ryzom/client/src/entity_animation_manager.cpp index 04148db6f..0e16168ce 100644 --- a/code/ryzom/client/src/entity_animation_manager.cpp +++ b/code/ryzom/client/src/entity_animation_manager.cpp @@ -207,7 +207,7 @@ void CEntityAnimationManager::load(NLMISC::IProgressCallback &/* progress */, bo string sTmp = strlwr(pASLS->AnimSetList[i].Name); sTmp = sTmp.substr(0,sTmp.rfind('.')); pair::iterator, bool> it; - it = _AnimSet.insert(pair::pair(sTmp,as)); + it = _AnimSet.insert(pair(sTmp,as)); it.first->second.init (&pASLS->AnimSetList[i], _AnimationSet); } diff --git a/code/ryzom/client/src/interface_v3/interface_ddx.cpp b/code/ryzom/client/src/interface_v3/interface_ddx.cpp index a857b471d..b987f9cf9 100644 --- a/code/ryzom/client/src/interface_v3/interface_ddx.cpp +++ b/code/ryzom/client/src/interface_v3/interface_ddx.cpp @@ -961,7 +961,7 @@ void CDDXManager::release() // *************************************************************************** void CDDXManager::add(CInterfaceDDX *pDDX) { - _DDXes.insert(pair::pair(pDDX->getId(),pDDX)); + _DDXes.insert(pair(pDDX->getId(),pDDX)); } // *************************************************************************** diff --git a/code/ryzom/client/src/interface_v3/interface_parser.cpp b/code/ryzom/client/src/interface_v3/interface_parser.cpp index 07d0120bb..16cd02f1a 100644 --- a/code/ryzom/client/src/interface_v3/interface_parser.cpp +++ b/code/ryzom/client/src/interface_v3/interface_parser.cpp @@ -248,7 +248,7 @@ public: { string sTmp = child->getId(); sTmp = sTmp.substr(_Id.size()+1,sTmp.size()); - _Accel.insert(pair::pair(sTmp, child)); + _Accel.insert(pair(sTmp, child)); CInterfaceGroup::addGroup(child,eltOrder); } diff --git a/code/ryzom/client/src/interface_v3/inventory_manager.cpp b/code/ryzom/client/src/interface_v3/inventory_manager.cpp index b8fa5cda5..0755e2247 100644 --- a/code/ryzom/client/src/interface_v3/inventory_manager.cpp +++ b/code/ryzom/client/src/interface_v3/inventory_manager.cpp @@ -2795,17 +2795,17 @@ class CHandlerInvTempAll : public IActionHandler // Try to put all items in the DB order in all the bags of the player : (bag, pa0-3, steed) vector > BagsBulk; - BagsBulk.push_back(pair ::pair(pInv->getBagBulk(0), pInv->getMaxBagBulk(0))); + BagsBulk.push_back(pair (pInv->getBagBulk(0), pInv->getMaxBagBulk(0))); nlctassert(MAX_INVENTORY_ANIMAL==4); if (pInv->isInventoryAvailable(INVENTORIES::pet_animal1)) - BagsBulk.push_back(pair ::pair(pInv->getBagBulk(2), pInv->getMaxBagBulk(2))); + BagsBulk.push_back(pair (pInv->getBagBulk(2), pInv->getMaxBagBulk(2))); if (pInv->isInventoryAvailable(INVENTORIES::pet_animal2)) - BagsBulk.push_back(pair ::pair(pInv->getBagBulk(3), pInv->getMaxBagBulk(3))); + BagsBulk.push_back(pair (pInv->getBagBulk(3), pInv->getMaxBagBulk(3))); if (pInv->isInventoryAvailable(INVENTORIES::pet_animal3)) - BagsBulk.push_back(pair ::pair(pInv->getBagBulk(4), pInv->getMaxBagBulk(4))); + BagsBulk.push_back(pair (pInv->getBagBulk(4), pInv->getMaxBagBulk(4))); if (pInv->isInventoryAvailable(INVENTORIES::pet_animal4)) - BagsBulk.push_back(pair ::pair(pInv->getBagBulk(4), pInv->getMaxBagBulk(4))); + BagsBulk.push_back(pair (pInv->getBagBulk(4), pInv->getMaxBagBulk(4))); bool bPlaceFound = true; diff --git a/code/ryzom/client/src/interface_v3/macrocmd_key.cpp b/code/ryzom/client/src/interface_v3/macrocmd_key.cpp index a9541847b..613b492ea 100644 --- a/code/ryzom/client/src/interface_v3/macrocmd_key.cpp +++ b/code/ryzom/client/src/interface_v3/macrocmd_key.cpp @@ -417,13 +417,13 @@ void CModalContainerEditCmd::create(const std::string &name, bool bDefKey, bool pIM->getDbProp(DbComboDisp2P); vector< pair > vArgs; - vArgs.push_back(pair::pair("id",name)); - vArgs.push_back(pair::pair("db_sel_cat",DbComboSelCat)); - vArgs.push_back(pair::pair("db_sel_act",DbComboSelAct)); - vArgs.push_back(pair::pair("db_sel_1p",DbComboSel1P)); - vArgs.push_back(pair::pair("db_sel_2p",DbComboSel2P)); - vArgs.push_back(pair::pair("db_disp_1p",DbComboDisp1P)); - vArgs.push_back(pair::pair("db_disp_2p",DbComboDisp2P)); + vArgs.push_back(pair("id",name)); + vArgs.push_back(pair("db_sel_cat",DbComboSelCat)); + vArgs.push_back(pair("db_sel_act",DbComboSelAct)); + vArgs.push_back(pair("db_sel_1p",DbComboSel1P)); + vArgs.push_back(pair("db_sel_2p",DbComboSel2P)); + vArgs.push_back(pair("db_disp_1p",DbComboDisp1P)); + vArgs.push_back(pair("db_disp_2p",DbComboDisp2P)); Win = dynamic_cast(pIM->createGroupInstance(TEMPLATE_EDITCMD, "ui:interface", vArgs)); if (Win == NULL) diff --git a/code/ryzom/client/src/interface_v3/people_list.cpp b/code/ryzom/client/src/interface_v3/people_list.cpp index b525479f8..2255176d6 100644 --- a/code/ryzom/client/src/interface_v3/people_list.cpp +++ b/code/ryzom/client/src/interface_v3/people_list.cpp @@ -73,13 +73,13 @@ bool CPeopleList::create(const CPeopleListDesc &desc, const CChatWindowDesc *cha // create the base container vector< pair > baseContainerParams; - baseContainerParams.push_back(pair::pair("id", desc.Id)); + baseContainerParams.push_back(pair("id", desc.Id)); std::string baseId; if (fatherContainer == NULL) { - baseContainerParams.push_back(pair::pair("movable","true")); - baseContainerParams.push_back(pair::pair("active","false")); - baseContainerParams.push_back(pair::pair("opened","true")); + baseContainerParams.push_back(pair("movable","true")); + baseContainerParams.push_back(pair("active","false")); + baseContainerParams.push_back(pair("opened","true")); baseId = "ui:interface"; } else diff --git a/code/ryzom/client/src/login.cpp b/code/ryzom/client/src/login.cpp index 8d3a0293b..99e1c7443 100644 --- a/code/ryzom/client/src/login.cpp +++ b/code/ryzom/client/src/login.cpp @@ -177,9 +177,9 @@ void createOptionalCatUI() { vector< pair < string, string > > params; params.clear(); - params.push_back(pair::pair("id", "c"+toString(i))); + params.push_back(pair("id", "c"+toString(i))); if (i>0) - params.push_back(pair::pair("posref", "BL TL")); + params.push_back(pair("posref", "BL TL")); CInterfaceGroup *pNewLine = pIM->createGroupInstance("t_cat", GROUP_LIST_CAT, params); if (pNewLine != NULL) @@ -1103,9 +1103,9 @@ void initShardDisplay() { vector< pair < string, string > > params; params.clear(); - params.push_back(pair::pair("id", "s"+toString(i))); + params.push_back(pair("id", "s"+toString(i))); if (i>0) - params.push_back(pair::pair("posref", "BL TL")); + params.push_back(pair("posref", "BL TL")); CInterfaceGroup *pNewLine =pIM->createGroupInstance("t_shard", GROUP_LIST_SHARD, params); if (pNewLine != NULL) @@ -1229,9 +1229,9 @@ void onlogin(bool vanishScreen = true) // { // vector< pair < string, string > > params; // params.clear(); -// params.push_back(pair::pair("id", "s"+toString(i))); +// params.push_back(pair("id", "s"+toString(i))); // if (i>0) -// params.push_back(pair::pair("posref", "BL TL")); +// params.push_back(pair("posref", "BL TL")); // // CInterfaceGroup *pNewLine =pIM->createGroupInstance("t_shard", GROUP_LIST_SHARD, params); // if (pNewLine != NULL) @@ -2033,23 +2033,23 @@ class CAHInitResLod : public IActionHandler // first indicates the preset-able cfg-variable // second indicates if its a double variable (else it's an int) CfgPresetList.clear(); - CfgPresetList.push_back(pair::pair("LandscapeTileNear", true)); - CfgPresetList.push_back(pair::pair("LandscapeThreshold", true)); - CfgPresetList.push_back(pair::pair("Vision", true)); - CfgPresetList.push_back(pair::pair("MicroVeget", false)); - CfgPresetList.push_back(pair::pair("MicroVegetDensity", true)); - CfgPresetList.push_back(pair::pair("FxNbMaxPoly", false)); - CfgPresetList.push_back(pair::pair("Cloud", false)); - CfgPresetList.push_back(pair::pair("CloudQuality", true)); - CfgPresetList.push_back(pair::pair("CloudUpdate", false)); - CfgPresetList.push_back(pair::pair("Shadows", false)); - CfgPresetList.push_back(pair::pair("SkinNbMaxPoly", false)); - CfgPresetList.push_back(pair::pair("NbMaxSkeletonNotCLod", false)); - CfgPresetList.push_back(pair::pair("CharacterFarClip", true)); + CfgPresetList.push_back(pair("LandscapeTileNear", true)); + CfgPresetList.push_back(pair("LandscapeThreshold", true)); + CfgPresetList.push_back(pair("Vision", true)); + CfgPresetList.push_back(pair("MicroVeget", false)); + CfgPresetList.push_back(pair("MicroVegetDensity", true)); + CfgPresetList.push_back(pair("FxNbMaxPoly", false)); + CfgPresetList.push_back(pair("Cloud", false)); + CfgPresetList.push_back(pair("CloudQuality", true)); + CfgPresetList.push_back(pair("CloudUpdate", false)); + CfgPresetList.push_back(pair("Shadows", false)); + CfgPresetList.push_back(pair("SkinNbMaxPoly", false)); + CfgPresetList.push_back(pair("NbMaxSkeletonNotCLod", false)); + CfgPresetList.push_back(pair("CharacterFarClip", true)); - CfgPresetList.push_back(pair::pair("Bloom", false)); - CfgPresetList.push_back(pair::pair("SquareBloom", false)); - CfgPresetList.push_back(pair::pair("DensityBloom", true)); + CfgPresetList.push_back(pair("Bloom", false)); + CfgPresetList.push_back(pair("SquareBloom", false)); + CfgPresetList.push_back(pair("DensityBloom", true)); // Check if all the preset-able cfg-variable are in a preset mode sint nPreset = -1;