From b4d5bb9af53b8da3457f852bfb7446ad553c7710 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 11 Dec 2016 14:20:31 +0100 Subject: [PATCH] Changed: Removed unused variables --- .../src/interface_v3/action_handler_help.cpp | 2 -- .../client/src/interface_v3/dbctrl_sheet.cpp | 3 +-- code/ryzom/client/src/interface_v3/group_map.cpp | 4 ++-- .../client/src/interface_v3/interface_ddx.cpp | 1 - .../src/interface_v3/interface_manager.cpp | 16 ++++++++-------- code/ryzom/client/src/login_xdelta.cpp | 4 ++-- code/ryzom/client/src/network_connection.cpp | 4 ++-- code/ryzom/client/src/player_r2_cl.cpp | 3 --- code/ryzom/client/src/r2/instance_map_deco.cpp | 1 - code/ryzom/client/src/r2/tool_choose_pos.cpp | 7 +------ 10 files changed, 16 insertions(+), 29 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/action_handler_help.cpp b/code/ryzom/client/src/interface_v3/action_handler_help.cpp index dbd6d6ac1..034af7317 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_help.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_help.cpp @@ -284,7 +284,6 @@ CInterfaceGroup *CInterfaceHelp::activateNextWindow(CDBCtrlSheet *elt, sint forc // If some free window possible, search which to take sint newIndexWindow= -1; - bool mustPlace= true; bool mustAddToActiveWindows= true; // if an active window is not in KeepMode, get it. for(i=0;i<_ActiveWindows.size();i++) @@ -293,7 +292,6 @@ CInterfaceGroup *CInterfaceHelp::activateNextWindow(CDBCtrlSheet *elt, sint forc if(!_InfoWindows[_ActiveWindows[i]].KeepMode && forceKeepWindow!=(sint)_ActiveWindows[i]) { newIndexWindow= _ActiveWindows[i]; - mustPlace= false; mustAddToActiveWindows= false; break; } diff --git a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp index abd85de83..92e65ac9d 100644 --- a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp +++ b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp @@ -1816,8 +1816,7 @@ void CDBCtrlSheet::draw() CInterfaceManager *pIM = CInterfaceManager::getInstance(); CViewRenderer &rVR = *CViewRenderer::getInstance(); - CRGBA color = CRGBA(255,255,255,255); - + if (_Type != SheetType_Macro) { if (_LastSheetId != _SheetId.getSInt32()) diff --git a/code/ryzom/client/src/interface_v3/group_map.cpp b/code/ryzom/client/src/interface_v3/group_map.cpp index cbcbf4690..554059be7 100644 --- a/code/ryzom/client/src/interface_v3/group_map.cpp +++ b/code/ryzom/client/src/interface_v3/group_map.cpp @@ -840,13 +840,13 @@ bool CGroupMap::getCtrlsUnder (sint32 x, sint32 y, sint32 clipX, sint32 clipY, s (y < (clipY + clipH)))) return false; - bool bFound = false; +// bool bFound = false; for (uint32 i = 0; i < _PolyButtons.size(); ++i) { if (_PolyButtons[i]->contains(CVector2f((float)x,(float)y))) { vICL.push_back(_PolyButtons[i]); - bFound = true; +// bFound = true; } } return CInterfaceGroup::getCtrlsUnder(x, y, clipX, clipY, clipW, clipH, vICL); diff --git a/code/ryzom/client/src/interface_v3/interface_ddx.cpp b/code/ryzom/client/src/interface_v3/interface_ddx.cpp index daac1bd09..b63f049e7 100644 --- a/code/ryzom/client/src/interface_v3/interface_ddx.cpp +++ b/code/ryzom/client/src/interface_v3/interface_ddx.cpp @@ -250,7 +250,6 @@ void CInterfaceDDX::CParam::backupDB() if (Widget == ColorButton) { - CRGBA col = CRGBA::White; CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp(Link,false); if (pNL != NULL) { diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index e732a1efc..45d9d5ebb 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp @@ -795,8 +795,8 @@ void CInterfaceManager::uninitOutGame() CInterfaceItemEdition::getInstance()->setCurrWindow(NULL); - NLMISC::TTime initStart; - initStart = ryzomGetLocalTime (); +// NLMISC::TTime initStart; +// initStart = ryzomGetLocalTime (); if (SoundMngr != NULL) { NLSOUND::UAudioMixer *pMixer = SoundMngr->getMixer(); @@ -804,23 +804,23 @@ void CInterfaceManager::uninitOutGame() } //nlinfo ("%d seconds for uninitOutGame", (uint32)(ryzomGetLocalTime ()-initStart)/1000); - initStart = ryzomGetLocalTime (); +// initStart = ryzomGetLocalTime (); CWidgetManager::getInstance()->activateMasterGroup ("ui:outgame", false); CInterfaceParser *parser = dynamic_cast< CInterfaceParser* >( CWidgetManager::getInstance()->getParser() ); //nlinfo ("%d seconds for activateMasterGroup", (uint32)(ryzomGetLocalTime ()-initStart)/1000); - initStart = ryzomGetLocalTime (); +// initStart = ryzomGetLocalTime (); parser->removeAll(); //nlinfo ("%d seconds for removeAll", (uint32)(ryzomGetLocalTime ()-initStart)/1000); - initStart = ryzomGetLocalTime (); +// initStart = ryzomGetLocalTime (); reset(); //nlinfo ("%d seconds for reset", (uint32)(ryzomGetLocalTime ()-initStart)/1000); // reset the mouse pointer to avoid invalid pointer access CWidgetManager::getInstance()->setPointer( NULL ); - initStart = ryzomGetLocalTime (); +// initStart = ryzomGetLocalTime (); CInterfaceLink::removeAllLinks(); //nlinfo ("%d seconds for removeAllLinks", (uint32)(ryzomGetLocalTime ()-initStart)/1000); - initStart = ryzomGetLocalTime (); +// initStart = ryzomGetLocalTime (); ICDBNode::CTextId textId("UI"); NLGUI::CDBManager::getInstance()->getDB()->removeNode(textId); //nlinfo ("%d seconds for removeNode", (uint32)(ryzomGetLocalTime ()-initStart)/1000); @@ -828,7 +828,7 @@ void CInterfaceManager::uninitOutGame() // Init the action manager { - initStart = ryzomGetLocalTime (); +// initStart = ryzomGetLocalTime (); uninitActions(); // nlinfo ("%d seconds for uninitActions", (uint32)(ryzomGetLocalTime ()-initStart)/1000); } diff --git a/code/ryzom/client/src/login_xdelta.cpp b/code/ryzom/client/src/login_xdelta.cpp index e6b4bde28..70a6f7a48 100644 --- a/code/ryzom/client/src/login_xdelta.cpp +++ b/code/ryzom/client/src/login_xdelta.cpp @@ -525,7 +525,7 @@ CXDeltaPatch::TApplyResult CXDeltaPatch::apply(const std::string &sFileToPatch, } SXDeltaCtrl::SSourceInfo *pFromSource = NULL; - SXDeltaCtrl::SSourceInfo *pDataSource = NULL; +// SXDeltaCtrl::SSourceInfo *pDataSource = NULL; if (_Ctrl.SourceInfo.size() > 0) { @@ -533,7 +533,7 @@ CXDeltaPatch::TApplyResult CXDeltaPatch::apply(const std::string &sFileToPatch, if (rInfo.IsData) { - pDataSource = &rInfo; +// pDataSource = &rInfo; } else { diff --git a/code/ryzom/client/src/network_connection.cpp b/code/ryzom/client/src/network_connection.cpp index d78fd6199..2638f4162 100644 --- a/code/ryzom/client/src/network_connection.cpp +++ b/code/ryzom/client/src/network_connection.cpp @@ -2030,7 +2030,7 @@ void CNetworkConnection::sendNormalMessage() uint numPacked = 0; // pack each block - TGameCycle lastPackedCycle = 0; +// TGameCycle lastPackedCycle = 0; list::iterator itblock; //nldebug("CNET[%p]: sending message %d", this, _CurrentSendNumber); @@ -2052,7 +2052,7 @@ void CNetworkConnection::sendNormalMessage() //nlassertex((*itblock).Cycle > lastPackedCycle, ("(*itblock).Cycle=%d lastPackedCycle=%d", (*itblock).Cycle, lastPackedCycle)); - lastPackedCycle = block.Cycle; +// lastPackedCycle = block.Cycle; block.serial(message); ++numPacked; diff --git a/code/ryzom/client/src/player_r2_cl.cpp b/code/ryzom/client/src/player_r2_cl.cpp index e587e4baa..d04c93012 100644 --- a/code/ryzom/client/src/player_r2_cl.cpp +++ b/code/ryzom/client/src/player_r2_cl.cpp @@ -121,9 +121,6 @@ CPlayerR2CL::~CPlayerR2CL() CGenderInfo * CPlayerR2CL::getGenderInfo() { - string propName = toString("SERVER:Entities:E%d:P%d", _Slot, CLFECOMMON::PROPERTY_VPB); - sint64 vA = NLGUI::CDBManager::getInstance()->getDbProp(propName)->getValue64(); - SPropVisualA visualA = *(SPropVisualA *)(&vA); EGSPD::CPeople::TPeople ePeople = _Sheet->Race; bool bMale = (_Sheet->Gender == GSGENDER::male); diff --git a/code/ryzom/client/src/r2/instance_map_deco.cpp b/code/ryzom/client/src/r2/instance_map_deco.cpp index 179af48b3..4af0550f4 100644 --- a/code/ryzom/client/src/r2/instance_map_deco.cpp +++ b/code/ryzom/client/src/r2/instance_map_deco.cpp @@ -262,7 +262,6 @@ void CInstanceMapDeco::onPreRender(CGroupMap &groupMap) { _Orient->setActive(true); _Orient->setColorRGBA(CRGBA(255, 255, 255, (uint8) (255 * _OrientBlendFactor))); - CVector2f worldPos = getWorldPos(); sint32 x; sint32 y; groupMap.worldToWindowSnapped(x, y, getWorldPos()); diff --git a/code/ryzom/client/src/r2/tool_choose_pos.cpp b/code/ryzom/client/src/r2/tool_choose_pos.cpp index 877a3b78d..c41597656 100644 --- a/code/ryzom/client/src/r2/tool_choose_pos.cpp +++ b/code/ryzom/client/src/r2/tool_choose_pos.cpp @@ -231,13 +231,11 @@ void CToolChoosePos::updateBeforeRender() if (entity) { CMatrix mat; - bool shown = false; if (worldViewRay.OnMiniMap && rayIntersectionType == NoIntersection) { entity->show(false); } - else - if (!entity->skeleton()) + else if (!entity->skeleton()) { /* nlwarning("Selected entity for the 'create' tool has no skeleton"); @@ -266,7 +264,6 @@ void CToolChoosePos::updateBeforeRender() return; } entity->show(true); - shown = true; // CQuat frontQuat(CVector::K, _CreateAngle - (float) (NLMISC::Pi / 2)); inst.setRotQuat(frontQuat); @@ -277,7 +274,6 @@ void CToolChoosePos::updateBeforeRender() else { entity->show(true); - shown = true; // entity->updateVisible(T1, NULL); entity->updatePos(T1, NULL); @@ -293,7 +289,6 @@ void CToolChoosePos::updateBeforeRender() mat.setRot(frontQuat); mat.setPos(entityPos); */ - CMatrix skelMatrix = entity->skeleton()->getMatrix(); // relative position to skeleton root CVector skelRootRelativePos = entity->skeleton()->getMatrix().getPos() - entity->pos().asVector(); // combine quat for front face xform & anim quat