diff --git a/code/ryzom/client/src/interface_v3/bot_chat_page_trade.cpp b/code/ryzom/client/src/interface_v3/bot_chat_page_trade.cpp index ae608fa79..c09c2b16a 100644 --- a/code/ryzom/client/src/interface_v3/bot_chat_page_trade.cpp +++ b/code/ryzom/client/src/interface_v3/bot_chat_page_trade.cpp @@ -313,7 +313,7 @@ void CBotChatPageTrade::update() // *************************************************************************************** uint32 CBotChatPageTrade::getCurrItemQuantity() const { - if (!_CurrItemSheet) return ~0; + if (!_CurrItemSheet) return std::numeric_limits::max(); if(!_QuantityEdit) return 1; if (_CurrItemSheet->getType() == CCtrlSheetInfo::SheetType_Item) { @@ -323,10 +323,10 @@ uint32 CBotChatPageTrade::getCurrItemQuantity() const { CInterfaceManager *im = CInterfaceManager::getInstance(); CInterfaceGroup *ig = dynamic_cast(im->getElementFromId(WIN_BOT_CHAT_SELL_BUY_ITEM)); - if (!ig) return ~0; + if (!ig) return std::numeric_limits::max(); // TODO: edit box in faction points? CGroupEditBox *ed = dynamic_cast(ig->getGroup("header_opened:standard_price:quantity:edit:eb")); - if (!ed) return ~0; + if (!ed) return std::numeric_limits::max(); uint32 intQuantity; if (fromString(ed->getInputString().toString(), intQuantity)) { @@ -334,14 +334,14 @@ uint32 CBotChatPageTrade::getCurrItemQuantity() const } else { - return ~0; + return std::numeric_limits::max(); } } else { return 1; } - return ~0; + return std::numeric_limits::max(); } return 1; } @@ -571,7 +571,7 @@ void CBotChatPageTrade::updateTradeModal() // get price (with fame) uint64 priceWithFame = getCurrItemPrice(true); // update resale price from quantity - sint32 resalePrice = getCurrItemPriceResale(); + uint32 resalePrice = getCurrItemPriceResale(); // get faction points and type from current item PVP_CLAN::TPVPClan fpType; @@ -624,7 +624,7 @@ void CBotChatPageTrade::updateTradeModal() // if price/quantity is valid - bool validSetup= priceWithoutFame != ~0 && quantity != ~0 && quantity != 0; + bool validSetup= priceWithoutFame != std::numeric_limits::max() && quantity != std::numeric_limits::max() && quantity != 0; if(validSetup && _BuyMean==MoneyFactionPoints) { // valid if at least one price type is not 0 diff --git a/code/ryzom/client/src/interface_v3/character_3d.cpp b/code/ryzom/client/src/interface_v3/character_3d.cpp index 2c21f9c8e..bbea38059 100644 --- a/code/ryzom/client/src/interface_v3/character_3d.cpp +++ b/code/ryzom/client/src/interface_v3/character_3d.cpp @@ -138,7 +138,7 @@ void SCharacter3DSetup::setupDefault (EGSPD::CPeople::TPeople eRace, bool bMale) sint32 cpIndex = convert_VisualSlot_To_Char3DPart ((SLOTTYPE::EVisualSlot)i); if (cpIndex != Char3DPart_INVALID) { - Parts[i].Quality = pIS->MapVariant; + Parts[cpIndex].Quality = pIS->MapVariant; if (Male) Parts[cpIndex].Name = pIS->getShape(); else @@ -498,7 +498,7 @@ void DEBUG_DumpClothes() SLOTTYPE::EVisualSlot vs = SCharacter3DSetup::convert_Char3DPart_To_VisualSlot((TChar3DPart)cp); string sTmp = SCharacter3DSetup::convert_VisualSlot_To_String(vs); nlinfo("*** PART *** : %s", sTmp.c_str()); - uint nNbItems; + uint nNbItems = 0; if (cp == Char3DPart_HandRightItem) nNbItems = 1<<11; if ((cp == Char3DPart_Chest) || (cp == Char3DPart_Hands) || (cp == Char3DPart_Feet)) @@ -699,7 +699,7 @@ void CCharacter3D::disableFaceMorphAndBlinks() if(_FacePlayList && _AnimationSet) { // disable eye blink animation (handled by ourselves) - sint id= _AnimationSet->getChannelIdByName("visage_100MorphFactor"); + uint id= _AnimationSet->getChannelIdByName("visage_100MorphFactor"); if(id!=UAnimationSet::NotFound) _FacePlayList->enableChannel(id, false); // disable morph target (handled by ourselves) @@ -729,7 +729,7 @@ void CCharacter3D::setup (const SCharacter3DSetup &c3ds) { _PlayList->registerTransform (_Skeleton); // disable pos animation - sint id= _AnimationSet->getChannelIdByName("pos"); + uint id= _AnimationSet->getChannelIdByName("pos"); if(id!=UAnimationSet::NotFound) _PlayList->enableChannel(id, false); } diff --git a/code/ryzom/client/src/interface_v3/chat_filter.cpp b/code/ryzom/client/src/interface_v3/chat_filter.cpp index da0645ed6..037526c12 100644 --- a/code/ryzom/client/src/interface_v3/chat_filter.cpp +++ b/code/ryzom/client/src/interface_v3/chat_filter.cpp @@ -239,8 +239,7 @@ void CChatInputFilter::clearMessages() //============================================================================================================= -CChatTargetFilter::CChatTargetFilter() : _TargetPartyChat(NULL), - _Chat(NULL) +CChatTargetFilter::CChatTargetFilter() : _Chat(NULL), _TargetPartyChat(NULL) { _TargetGroup= CChatGroup::say; _TargetDynamicChannelDbIndex= 0; diff --git a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp index c10253128..e328816a9 100644 --- a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp +++ b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp @@ -912,6 +912,8 @@ void CDBCtrlSheet::initSheetSize() _DispSlotBmpId = rVR.getTextureIdFromName ("w_slot_blason.tga"); _DispSelSlotId = rVR.getTextureIdFromName ("w_slot_blason_over.tga"); break; + default: + break; } } rVR.getTextureSizeFromId (_DispSlotBmpId, _W, _H); @@ -1855,7 +1857,7 @@ void CDBCtrlSheet::draw() else { float animProgress = 1.f - float(_NotifyAnimEndTime - T1) / float(NOTIFY_ANIM_MS_DURATION); - uint32 texId = rVR.getSystemTextureId(CViewRenderer::GlowStarTexture); + sint32 texId = rVR.getSystemTextureId(CViewRenderer::GlowStarTexture); if (texId != -1) { sint32 texWidth, texHeight; @@ -1865,8 +1867,8 @@ void CDBCtrlSheet::draw() const float freq1 = -1.f; const float phase1 = 0.f; float scale = sqrtf(1.f - animProgress); - drawRotatedQuad(rVR, float(NLMISC::Pi) * animProgress * freq0 + phase0, scale, _RenderLayer + 3, texId, texWidth, texHeight); - drawRotatedQuad(rVR, float(NLMISC::Pi) * animProgress * freq1 + phase1, scale, _RenderLayer + 3, texId, texWidth, texHeight); + drawRotatedQuad(rVR, float(NLMISC::Pi) * animProgress * freq0 + phase0, scale, _RenderLayer + 3, (uint32)texId, texWidth, texHeight); + drawRotatedQuad(rVR, float(NLMISC::Pi) * animProgress * freq1 + phase1, scale, _RenderLayer + 3, (uint32)texId, texWidth, texHeight); } } } @@ -2417,6 +2419,8 @@ void CDBCtrlSheet::drawSheet (sint32 x, sint32 y, bool draging, bool showSelecti rVR.draw11RotFlipBitmap (_RenderLayer, x, y, 0, false, _DispOverBmpId, curSheetColor); displayCharBitmaps(_RenderLayer+2, x, y, curSheetColor); break; + default: + break; } if (showSelectionBorder) diff --git a/code/ryzom/client/src/interface_v3/dbgroup_build_phrase.cpp b/code/ryzom/client/src/interface_v3/dbgroup_build_phrase.cpp index 752284d95..09bda7c53 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_build_phrase.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_build_phrase.cpp @@ -808,7 +808,7 @@ public: std::vector Sons; public: - CParamTreeNode(CParamTreeNode *parent) : Brick(NULL), Parent(parent), Valid(true) {} + CParamTreeNode(CParamTreeNode *parent) : Brick(NULL), Valid(true), Parent(parent) {} ~CParamTreeNode() { Parent= NULL; diff --git a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet.cpp b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet.cpp index c03459b92..58cb0bae7 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet.cpp @@ -142,7 +142,7 @@ bool CDBGroupListSheet::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) // get item size. CViewRenderer &rVR = pIM->getViewRenderer(); - sint32 dispSlotBmpId; + sint32 dispSlotBmpId = 0; switch(_CtrlInfo._Type) { case CCtrlSheetInfo::SheetType_Auto: @@ -157,6 +157,7 @@ bool CDBGroupListSheet::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) dispSlotBmpId = rVR.getTextureIdFromName ("w_slot_brick.tga"); break; case CCtrlSheetInfo::SheetType_Macro: dispSlotBmpId = rVR.getTextureIdFromName ("w_slot_brick.tga"); break; + default: break; } rVR.getTextureSizeFromId (dispSlotBmpId, _WSlot, _HSlot); diff --git a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.cpp b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.cpp index 748964cc2..7511ee8ef 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.cpp @@ -548,6 +548,8 @@ bool CDBGroupListSheetTrade::CSheetChildTrade::isSheetValid(CDBGroupListSheetTex case TrainerCarac: return isCaracPhrase(*phraseSheet); break; + default: + break; } } diff --git a/code/ryzom/client/src/interface_v3/group_container.cpp b/code/ryzom/client/src/interface_v3/group_container.cpp index 3defd1b29..eb98fb67a 100644 --- a/code/ryzom/client/src/interface_v3/group_container.cpp +++ b/code/ryzom/client/src/interface_v3/group_container.cpp @@ -1348,13 +1348,17 @@ bool CGroupContainer::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup) ptr = xmlGetProp (cur, (xmlChar*)"title_opened"); if (ptr) + { if (_Localize) _TitleTextOpened = CI18N::get(string((const char*)ptr)); else _TitleTextOpened = string((const char*)ptr); + } ptr = xmlGetProp (cur, (xmlChar*)"title_closed"); if (ptr) + { if (_Localize) _TitleTextClosed = CI18N::get(string((const char*)ptr)); else _TitleTextClosed = string((const char*)ptr); + } ptr = xmlGetProp (cur, (xmlChar*)"header_active"); if (ptr) diff --git a/code/ryzom/client/src/interface_v3/group_editbox.cpp b/code/ryzom/client/src/interface_v3/group_editbox.cpp index e690dfbe1..b87d95f2d 100644 --- a/code/ryzom/client/src/interface_v3/group_editbox.cpp +++ b/code/ryzom/client/src/interface_v3/group_editbox.cpp @@ -48,44 +48,45 @@ NLMISC_REGISTER_OBJECT(CViewBase, CGroupEditBox, std::string, "edit_box"); CGroupEditBox::CGroupEditBox(const TCtorParam ¶m) : CInterfaceGroup(param), + _BlinkTime(0.f), _CursorPos(0), - _BlinkTime(0.f), - _BlinkState(false), - _ViewText(NULL), - _Setupped(false), - _EntryType(Text), - _MaxNumChar(std::numeric_limits::max()), - _MaxNumReturn(std::numeric_limits::max()), - _MaxFloatPrec(20), - _MaxCharsSize(32768), - _CursorAtPreviousLineEnd(false), - _BackupFatherContainerPos(false), - _WantReturn(false), - _CanRedo(false), - _CanUndo(false) + _MaxNumChar(std::numeric_limits::max()), + _MaxNumReturn(std::numeric_limits::max()), + _MaxFloatPrec(20), + _MaxCharsSize(32768), + _FirstVisibleChar(0), + _LastVisibleChar(0), + _ViewText(NULL), + _MaxHistoric(0), + _CurrentHistoricIndex(-1), + _PrevNumLine(1), + _EntryType(Text), + _Setupped(false), + _BypassNextKey(false), + _BlinkState(false), + _CursorAtPreviousLineEnd(false), + _LooseFocusOnEnter(true), + _RecoverFocusOnEnter(true), + _ResetFocusOnHide(false), + _BackupFatherContainerPos(false), + _WantReturn(false), + _Savable(true), + _DefaultInputString(false), + _Frozen(false), + _CanRedo(false), + _CanUndo(false), + _CursorTexID(-1), + _CursorWidth(0), + _IntegerMinValue(INT_MIN), + _IntegerMaxValue(INT_MAX), + _PositiveIntegerMinValue(0), + _PositiveIntegerMaxValue(UINT_MAX), + _ViewTextDeltaX(0) + { - _FirstVisibleChar = 0; - _LastVisibleChar = 0; _Prompt = ">"; - _LooseFocusOnEnter= true; - _RecoverFocusOnEnter= true; - _ResetFocusOnHide = false; _BackSelectColor= CRGBA::White; _TextSelectColor= CRGBA::Black; - _MaxHistoric= 0; - _CurrentHistoricIndex= -1; - _BypassNextKey = false; - _PrevNumLine = 1; - _Savable = true; - _CursorTexID = -1; - _CursorWidth = 0; - _IntegerMinValue= INT_MIN; - _IntegerMaxValue= INT_MAX; - _PositiveIntegerMinValue= 0; - _PositiveIntegerMaxValue= UINT_MAX; - _ViewTextDeltaX= 0; - _DefaultInputString= false; - _Frozen= false; } // ---------------------------------------------------------------------------- diff --git a/code/ryzom/client/src/interface_v3/group_editbox.h b/code/ryzom/client/src/interface_v3/group_editbox.h index 7046130f6..3a067cf25 100644 --- a/code/ryzom/client/src/interface_v3/group_editbox.h +++ b/code/ryzom/client/src/interface_v3/group_editbox.h @@ -205,7 +205,6 @@ public: protected: // Cursor infos - float _BlinkSpeed; float _BlinkTime; sint32 _CursorPos; uint32 _MaxNumChar; diff --git a/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp b/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp index 5da9794cc..dcc3895f7 100644 --- a/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp +++ b/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp @@ -574,10 +574,12 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (class CEntityCL *entity) { if ( (pPlayer->isPvpAlly(i) && UserEntity->isPvpAlly(i)) || (pPlayer->isPvpEnnemy(i) && UserEntity->isPvpEnnemy(i)) ) + { if ( civToDisplay == i) break; else civToDisplay = i; + } } } @@ -586,17 +588,21 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (class CEntityCL *entity) { if ( (pPlayer->isPvpAlly(i) && UserEntity->isPvpEnnemy(i)) || (pPlayer->isPvpEnnemy(i) && UserEntity->isPvpAlly(i)) ) + { if ( cultToDisplay == i) break; else cultToDisplay = i; + } if ( (pPlayer->isPvpAlly(i) && UserEntity->isPvpAlly(i)) || (pPlayer->isPvpEnnemy(i) && UserEntity->isPvpEnnemy(i)) ) + { if ( cultToDisplay == i) break; else cultToDisplay = i; + } } } @@ -606,34 +612,46 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (class CEntityCL *entity) if( pvpCivLogoBmp ) { if (pPlayer->isPvpAlly(civToDisplay)) + { if (pPlayer->isPvpRanger()) pvpCivLogoBmp->setTexture("pvp_ally_ranger.tga"); else pvpCivLogoBmp->setTexture("pvp_ally_"+toString(civToDisplay)+".tga"); + } else if (pPlayer->isPvpEnnemy(civToDisplay)) + { if (pPlayer->isPvpMarauder()) pvpCivLogoBmp->setTexture("pvp_enemy_marauder.tga"); else pvpCivLogoBmp->setTexture("pvp_enemy_"+toString(civToDisplay)+".tga"); + } else + { needCivPvpLogo = false; + } } CViewBitmap * pvpCultLogoBmp = dynamic_cast(pvpCultLogo); if( pvpCultLogoBmp ) { if (pPlayer->isPvpAlly(cultToDisplay)) + { if (pPlayer->isPvpPrimas()) pvpCultLogoBmp->setTexture("pvp_ally_primas.tga"); else pvpCultLogoBmp->setTexture("pvp_ally_"+toString(cultToDisplay)+".tga"); + } else if (pPlayer->isPvpEnnemy(cultToDisplay)) + { if (pPlayer->isPvpTrytonist()) pvpCultLogoBmp->setTexture("pvp_enemy_trytonist.tga"); else pvpCultLogoBmp->setTexture("pvp_enemy_"+toString(cultToDisplay)+".tga"); + } else + { needCultPvpLogo = false; + } } } else @@ -892,10 +910,12 @@ void CGroupInSceneUserInfo::updateDynamicData () // Set state fx CPlayerCL *pPlayer = dynamic_cast(_Entity); if (pPlayer != NULL) + { if (pPlayer->isAFK()) pPlayer->setStateFx("sp_medit.ps"); else if (pPlayer->getStateFx() == "sp_medit.ps") pPlayer->removeStateFx(); + } if (_Entity->isDead()) _Entity->setStateFx("misc_dead.ps"); diff --git a/code/ryzom/client/src/interface_v3/group_map.cpp b/code/ryzom/client/src/interface_v3/group_map.cpp index 6c5a3c15c..7ff3fe5a7 100644 --- a/code/ryzom/client/src/interface_v3/group_map.cpp +++ b/code/ryzom/client/src/interface_v3/group_map.cpp @@ -1563,7 +1563,7 @@ void CGroupMap::draw() CQuad fruQuad; CTriangle fruTri; - CRGBA fruColor; + CRGBA fruColor(0, 0, 0); if (_FrustumView) { @@ -2674,9 +2674,9 @@ void CGroupMap::fitWindow() { //sint32 diffHReal = parentCont->getHReal() - _HReal; float mapHeightOnScreen = floorf(_MapTexH * _Scale); - /*parentCont->setPopupMaxH((sint32) mapHeightOnScreen + diffHReal); - parentCont->setPopupMinH((sint32) std::min(_MinH, (sint32) mapHeightOnScreen) + diffHReal);*/ - /* + // parentCont->setPopupMaxH((sint32) mapHeightOnScreen + diffHReal); + // parentCont->setPopupMinH((sint32) std::min(_MinH, (sint32) mapHeightOnScreen) + diffHReal); + if ((float)_HReal >= mapHeightOnScreen) { _Offset.y = - _PlayerPos.y; @@ -3204,7 +3204,7 @@ class CAHValidateUserLandMarkName : public IActionHandler ig->setActive(false); - CUserLandMark::EUserLandMarkType landMarkType; + CUserLandMark::EUserLandMarkType landMarkType = CUserLandMark::Misc; sint8 nLandMarkType = im->getDbProp( "UI:TEMP:LANDMARKTYPE" )->getValue8(); if (nLandMarkType>=0 && nLandMarkType<=CUserLandMark::UserLandMarkTypeCount) { diff --git a/code/ryzom/client/src/interface_v3/group_menu.cpp b/code/ryzom/client/src/interface_v3/group_menu.cpp index 0c0bce9a8..93d2ee4bb 100644 --- a/code/ryzom/client/src/interface_v3/group_menu.cpp +++ b/code/ryzom/client/src/interface_v3/group_menu.cpp @@ -1805,7 +1805,7 @@ int CGroupSubMenu::luaSetUserGroupRight(CLuaState &ls) CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER); if (!(CLuaIHM::isUIOnStack(ls, 2) || ls.isNil(2))) { - CLuaIHM::fails(ls, toString("%s : Group required as argument 2", funcName)); + CLuaIHM::fails(ls, "%s : Group required as argument 2", funcName); } CInterfaceElement *el = CLuaIHM::getUIOnStack(ls, 2); CInterfaceGroup *group = dynamic_cast(el); diff --git a/code/ryzom/client/src/interface_v3/group_scrolltext.cpp b/code/ryzom/client/src/interface_v3/group_scrolltext.cpp index 99ef6c9c9..950ab9771 100644 --- a/code/ryzom/client/src/interface_v3/group_scrolltext.cpp +++ b/code/ryzom/client/src/interface_v3/group_scrolltext.cpp @@ -37,17 +37,16 @@ CGroupScrollText::CGroupScrollText(const TCtorParam ¶m) : CInterfaceGroup(param), _List(NULL), _ScrollBar(NULL), + _ButtonAdd(NULL), + _ButtonSub(NULL), _Settuped(false), _InvertScrollBar(true), _ListHeight(0), - _ButtonAdd(NULL), - _ButtonSub(NULL), _StartHeight(0), _EllapsedTime(0) { } - //======================================================================== CGroupScrollText::~CGroupScrollText() { diff --git a/code/ryzom/client/src/interface_v3/interface_config.cpp b/code/ryzom/client/src/interface_v3/interface_config.cpp index 9a5cbf828..05f7d3b1c 100644 --- a/code/ryzom/client/src/interface_v3/interface_config.cpp +++ b/code/ryzom/client/src/interface_v3/interface_config.cpp @@ -628,7 +628,7 @@ void CInterfaceConfig::CDesktopImage::toCurrentDesktop() { std::string elemID; f.serial(elemID); - uint32 chunkSize; + uint32 chunkSize = 0; f.serial(chunkSize); uint startPos = f.getPos(); CInterfaceManager *im = CInterfaceManager::getInstance(); diff --git a/code/ryzom/client/src/interface_v3/interface_expr.cpp b/code/ryzom/client/src/interface_v3/interface_expr.cpp index c66a7e97e..db184ef87 100644 --- a/code/ryzom/client/src/interface_v3/interface_expr.cpp +++ b/code/ryzom/client/src/interface_v3/interface_expr.cpp @@ -524,6 +524,7 @@ bool CInterfaceExprValue::toBool() case Integer: setBool(_IntegerValue != 0); return true; case Double: setBool(_DoubleValue != 0); return true; case String: return evalBoolean(_StringValue.toString().c_str()) != NULL; + default: break; } return false; @@ -541,8 +542,7 @@ bool CInterfaceExprValue::toInteger() if (evalNumber(_StringValue.toString().c_str())) return toInteger(); return false; case RGBA: setInteger((sint64) _RGBAValue); return true; - - break; + default: break; } return false; } @@ -559,7 +559,7 @@ bool CInterfaceExprValue::toDouble() if (evalNumber(_StringValue.toString().c_str())) return toBool(); return false; case RGBA: setDouble((double) _RGBAValue); return true; - break; + default: break; } return false; } @@ -583,6 +583,7 @@ bool CInterfaceExprValue::toString() setString(NLMISC::toString("%d %d %d %d", r, g, b, a)); return true; } + default: break; } return false; } @@ -597,7 +598,7 @@ bool CInterfaceExprValue::toRGBA() (uint8)((_IntegerValue>>16)&0xff), (uint8)((_IntegerValue>>24)&0xff))); return true; case String: setRGBA(stringToRGBA(_StringValue.toString().c_str())); return true; - break; + default: break; } return false; } @@ -788,6 +789,7 @@ void CInterfaceExprValue::clean() { case String: _StringValue.clear(); break; case UserType: delete _UserTypeValue; break; + default: break; } } diff --git a/code/ryzom/client/src/interface_v3/interface_expr_user_fct.cpp b/code/ryzom/client/src/interface_v3/interface_expr_user_fct.cpp index 691576511..06595968b 100644 --- a/code/ryzom/client/src/interface_v3/interface_expr_user_fct.cpp +++ b/code/ryzom/client/src/interface_v3/interface_expr_user_fct.cpp @@ -95,6 +95,7 @@ static DECLARE_INTERFACE_USER_FCT(userFctAdd) { case CIEV::Integer: result.setInteger(args[0].getInteger() + args[1].getInteger()); return true; case CIEV::Double: result.setDouble(args[0].getDouble() + args[1].getDouble()); return true; + default: break; } return false; } @@ -115,6 +116,7 @@ static DECLARE_INTERFACE_USER_FCT(userFctSub) { case CIEV::Integer: result.setInteger(args[0].getInteger() - args[1].getInteger()); return true; case CIEV::Double: result.setDouble(args[0].getDouble() - args[1].getDouble()); return true; + default: break; } return false; } @@ -135,6 +137,7 @@ static DECLARE_INTERFACE_USER_FCT(userFctMul) { case CIEV::Integer: result.setInteger(args[0].getInteger() * args[1].getInteger()); return true; case CIEV::Double: result.setDouble(args[0].getDouble() * args[1].getDouble()); return true; + default: break; } return false; } diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index 2cf1712c1..0db6246b1 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp @@ -6360,7 +6360,7 @@ bool CInterfaceManager::parseTokens(ucstring& ucstr) // Get everything between the two "$" size_t token_start_pos = start_pos + start_token.length(); size_t token_end_pos = end_pos - end_token.length(); - if ((token_start_pos - token_end_pos) < 0) + if (token_start_pos < token_end_pos) { // Wrong formatting; give up on this one. start_pos = end_pos; diff --git a/code/ryzom/client/src/interface_v3/inventory_manager.cpp b/code/ryzom/client/src/interface_v3/inventory_manager.cpp index 84319306c..6c32537dc 100644 --- a/code/ryzom/client/src/interface_v3/inventory_manager.cpp +++ b/code/ryzom/client/src/interface_v3/inventory_manager.cpp @@ -665,7 +665,7 @@ static void grayItem (const std::string &listname, sint32 bagEntryIndex, bool gr { pList->invalidateCoords(); - for(sint32 i = 0; i < MAX_BAGINV_ENTRIES; ++i) + for(uint i = 0; i < MAX_BAGINV_ENTRIES; ++i) { CDBCtrlSheet *pCS = pList->getSheet(i); string sTmp = pCS->getSheet(); @@ -681,7 +681,7 @@ static void grayItem (const std::string &listname, sint32 bagEntryIndex, bool gr // *************************************************************************** void CInventoryManager::wearBagItem(sint32 bagEntryIndex) { - if(bagEntryIndex>=0 && bagEntryIndex=0 && bagEntryIndex<(sint32)MAX_BAGINV_ENTRIES) { BagItemEquipped[bagEntryIndex]= true; grayItem (LIST_BAG_TEXT, bagEntryIndex, true); @@ -693,7 +693,7 @@ void CInventoryManager::wearBagItem(sint32 bagEntryIndex) // *************************************************************************** void CInventoryManager::unwearBagItem(sint32 bagEntryIndex) { - if(bagEntryIndex>=0 && bagEntryIndex=0 && bagEntryIndex<(sint32)MAX_BAGINV_ENTRIES) { BagItemEquipped[bagEntryIndex]= false; grayItem (LIST_BAG_TEXT, bagEntryIndex, false); @@ -705,7 +705,7 @@ void CInventoryManager::unwearBagItem(sint32 bagEntryIndex) // *************************************************************************** bool CInventoryManager::isBagItemWeared(sint32 bagEntryIndex) { - if(bagEntryIndex>=0 && bagEntryIndex=0 && bagEntryIndex<(sint32)MAX_BAGINV_ENTRIES) { return BagItemEquipped[bagEntryIndex]; } @@ -1808,7 +1808,7 @@ void CTempInvManager::updateForageQQ( uint whichOne ) bool disableTake = (pIM->getDbProp("LOCAL:INVENTORY:TEMP:ENABLE_TAKE")->getValue32() == 0); if ( disableTake ) { - float qt, ql; + float qt = 0.f, ql = 0.f; switch ( whichOne ) { case 0: diff --git a/code/ryzom/client/src/interface_v3/libwww_nel_stream.cpp b/code/ryzom/client/src/interface_v3/libwww_nel_stream.cpp index e89a58909..0a7043dbe 100644 --- a/code/ryzom/client/src/interface_v3/libwww_nel_stream.cpp +++ b/code/ryzom/client/src/interface_v3/libwww_nel_stream.cpp @@ -129,7 +129,7 @@ PUBLIC int HTLoadNeLFile (SOCKET soc, HTRequest * request) HTTRACE(PROT_TRACE, "HTLoadFile.. Looking for `%s\'\n" _ HTAnchor_physical(anchor)); if ((file = (file_info *) HT_CALLOC(1, sizeof(file_info))) == NULL) - HT_OUTOFMEM("HTLoadFILE"); + HT_OUTOFMEM((char*)"HTLoadFILE"); file->state = FS_BEGIN; file->net = net; HTNet_setContext(net, file); @@ -143,7 +143,7 @@ PRIVATE int ReturnEvent (HTTimer * timer, void * param, HTEventType /* type */) { file_info * file = (file_info *) param; if (timer != file->timer) - HTDEBUGBREAK("File timer %p not in sync\n" _ timer); + HTDEBUGBREAK((char*)"File timer %p not in sync\n" _ timer); HTTRACE(PROT_TRACE, "HTLoadFile.. Continuing %p with timer %p\n" _ file _ timer); /* @@ -166,7 +166,7 @@ PUBLIC int HTNeLFileOpen (HTNet * net, char * local, HTLocalMode /* mode */) if (!fp->open (local)) { - HTRequest_addSystemError(request, ERR_FATAL, errno, NO, "CIFile::open"); + HTRequest_addSystemError(request, ERR_FATAL, errno, NO, (char*)"CIFile::open"); return HT_ERROR; } @@ -189,7 +189,7 @@ PRIVATE int FileEvent (SOCKET /* soc */, void * pVoid, HTEventType type) { /* Interrupted */ HTRequest_addError(request, ERR_FATAL, NO, HTERR_INTERRUPTED, - NULL, 0, "HTLoadFile"); + NULL, 0, (char*)"HTLoadFile"); FileCleanup(request, HT_INTERRUPTED); return HT_OK; } @@ -419,6 +419,9 @@ PRIVATE int FileEvent (SOCKET /* soc */, void * pVoid, HTEventType type) FileCleanup(request, HT_ERROR); return HT_OK; break; + + default: + break; } } /* End of while(1) */ } @@ -576,7 +579,7 @@ PUBLIC HTInputStream * HTNeLReader_new (HTHost * host, HTChannel * ch, HTInputStream * me = HTChannel_input(ch); if (me == NULL) { if ((me=(HTInputStream *) HT_CALLOC(1, sizeof(HTInputStream))) == NULL) - HT_OUTOFMEM("HTNeLReader_new"); + HT_OUTOFMEM((char*)"HTNeLReader_new"); me->isa = &HTNeLReader; me->ch = ch; me->host = host; diff --git a/code/ryzom/client/src/interface_v3/lua_helper.cpp b/code/ryzom/client/src/interface_v3/lua_helper.cpp index bd01d42f9..0ec99d5a4 100644 --- a/code/ryzom/client/src/interface_v3/lua_helper.cpp +++ b/code/ryzom/client/src/interface_v3/lua_helper.cpp @@ -221,7 +221,7 @@ CLuaState::CLuaState() // *************************************************************************** -CLuaStackRestorer::CLuaStackRestorer(CLuaState *state, int finalSize) : _State(state), _FinalSize(finalSize) +CLuaStackRestorer::CLuaStackRestorer(CLuaState *state, int finalSize) : _FinalSize(finalSize), _State(state) { } @@ -509,7 +509,7 @@ void CLuaState::push(TLuaWrappedFunction function) nlassert(func); nlassert(state); // get real function pointer from the values in the closure - int numResults; + int numResults = 0; int initialStackSize = state->getTop(); try { diff --git a/code/ryzom/client/src/interface_v3/lua_ihm.cpp b/code/ryzom/client/src/interface_v3/lua_ihm.cpp index 3833b457e..5ab2bc084 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm.cpp +++ b/code/ryzom/client/src/interface_v3/lua_ihm.cpp @@ -3028,16 +3028,6 @@ void CLuaIHM::fails(CLuaState &ls, const char *format, ...) throw ELuaIHMException("%s. Lua stack = \n %s", reason.c_str(), stack.c_str()); } -// *************************************************************************** -void CLuaIHM::fails(CLuaState &ls, const std::string &format,...) -{ - //H_AUTO(Lua_CLuaIHM_fails) - std::string reason; - const char *formatPtr = format.c_str(); - NLMISC_CONVERT_VARGS (reason, formatPtr, NLMISC::MaxCStringSize); - fails(ls, reason.c_str()); -} - // *************************************************************************** void CLuaIHM::checkArgCount(CLuaState &ls, const char* funcName, uint nArgs) { @@ -3074,7 +3064,7 @@ void CLuaIHM::check(CLuaState &ls, bool ok, const std::string &failReason) //H_AUTO(Lua_CLuaIHM_check) if(!ok) { - fails(ls, failReason); + fails(ls, failReason.c_str()); } } @@ -3085,11 +3075,11 @@ void CLuaIHM::checkArgType(CLuaState &ls, const char *funcName, uint index, nlassert(index > 0); if (ls.getTop() < (int) index) { - fails(ls, toString("%s : argument %d of expected type %s was not defined", funcName, index, ls.getTypename(argType))); + fails(ls, "%s : argument %d of expected type %s was not defined", funcName, index, ls.getTypename(argType)); } if (ls.type(index) != argType) { - fails(ls, toString("%s : argument %d of expected type %s has bad type : %s", funcName, index, ls.getTypename(argType), ls.getTypename(ls.type(index)), ls.type(index))); + fails(ls, "%s : argument %d of expected type %s has bad type : %s", funcName, index, ls.getTypename(argType), ls.getTypename(ls.type(index)), ls.type(index)); } } @@ -3100,13 +3090,13 @@ void CLuaIHM::checkArgTypeRGBA(CLuaState &ls, const char *funcName, uint index) nlassert(index > 0); if (ls.getTop() < (int) index) { - fails(ls, toString("%s : argument %d of expected type RGBA was not defined", funcName, index)); + fails(ls, "%s : argument %d of expected type RGBA was not defined", funcName, index); } ls.pushValue(index); CRGBA dummy; if (!pop(ls, dummy)) { - fails(ls, toString("%s : argument %d of expected type RGBA has bad type : %s", funcName, index, ls.getTypename(ls.type(index)), ls.type(index))); + fails(ls, "%s : argument %d of expected type RGBA has bad type : %s", funcName, index, ls.getTypename(ls.type(index)), ls.type(index)); } } @@ -3117,11 +3107,11 @@ void CLuaIHM::checkArgTypeUIElement(CLuaState &ls, const char *funcName, uint in nlassert(index > 0); if (ls.getTop() < (int) index) { - fails(ls, toString("%s : argument %d of expected type ui element was not defined", funcName, index)); + fails(ls, "%s : argument %d of expected type ui element was not defined", funcName, index); } if (!isUIOnStack(ls, index)) { - fails(ls, toString("%s : argument %d of expected type ui element has bad type : %s", funcName, index, ls.getTypename(ls.type(index)), ls.type(index))); + fails(ls, "%s : argument %d of expected type ui element has bad type : %s", funcName, index, ls.getTypename(ls.type(index)), ls.type(index)); } } @@ -3132,13 +3122,13 @@ void CLuaIHM::checkArgTypeUCString(CLuaState &ls, const char *funcName, uint ind nlassert(index > 0); if (ls.getTop() < (int) index) { - fails(ls, toString("%s : argument %d of expected type ucstring was not defined", funcName, index)); + fails(ls, "%s : argument %d of expected type ucstring was not defined", funcName, index); } ls.pushValue(index); ucstring dummy; if (!pop(ls, dummy)) { - fails(ls, toString("%s : argument %d of expected type ucstring has bad type : %s", funcName, index, ls.getTypename(ls.type(index)), ls.type(index))); + fails(ls, "%s : argument %d of expected type ucstring has bad type : %s", funcName, index, ls.getTypename(ls.type(index)), ls.type(index)); } } diff --git a/code/ryzom/client/src/interface_v3/lua_ihm.h b/code/ryzom/client/src/interface_v3/lua_ihm.h index d773ae9ec..f2a0e2628 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm.h +++ b/code/ryzom/client/src/interface_v3/lua_ihm.h @@ -140,7 +140,6 @@ public: * The various check... function call this function when their test fails */ static void fails(CLuaState &ls, const char *format, ...); - static void fails(CLuaState &ls, const std::string &format, ...); /** execute function that is currently on the stack, possibly outputing error messages to the log * \return true if execution succeeded diff --git a/code/ryzom/client/src/interface_v3/people_interraction.cpp b/code/ryzom/client/src/interface_v3/people_interraction.cpp index c3309b8d2..cdd136780 100644 --- a/code/ryzom/client/src/interface_v3/people_interraction.cpp +++ b/code/ryzom/client/src/interface_v3/people_interraction.cpp @@ -1784,7 +1784,7 @@ void CPeopleInterraction::refreshActiveUserChats() //================================================================================================================= void CPeopleInterraction::talkInDynamicChannel(uint32 channelNb,ucstring sentence) { - if(channelNb>=0&& channelNbgetNumLine() > 5) + { pMenu->deleteLine(pMenu->getNumLine()-1); + } // Add dynamic chats uint insertion_index = 0; diff --git a/code/ryzom/client/src/interface_v3/people_list.cpp b/code/ryzom/client/src/interface_v3/people_list.cpp index 8ffa051a7..46946ea60 100644 --- a/code/ryzom/client/src/interface_v3/people_list.cpp +++ b/code/ryzom/client/src/interface_v3/people_list.cpp @@ -46,8 +46,8 @@ extern CClientChatManager ChatMngr; //================================================================== CPeopleList::CPeopleList() : _ChatWindow(NULL), - _CurrPeopleID(0), _ContactType(CPeopleListDesc::Unknown), + _CurrPeopleID(0), _Savable(false) { diff --git a/code/ryzom/client/src/interface_v3/skill_manager.cpp b/code/ryzom/client/src/interface_v3/skill_manager.cpp index 9fa987201..98f2b5dfe 100644 --- a/code/ryzom/client/src/interface_v3/skill_manager.cpp +++ b/code/ryzom/client/src/interface_v3/skill_manager.cpp @@ -974,13 +974,13 @@ void CSkillManager::tryToUnblockTitleFromItems() // check items present in bag for (uint itemSlot = 0; itemSlot < numItems; ++itemSlot) { - sint32 sheetItem = 0; + uint32 sheetItem = 0; sint32 qualityItem = 0; // get sheetid CCDBNodeLeaf *node = pIM->getDbProp(branch + ":" + toString(itemSlot) + ":SHEET", false); if (node) - sheetItem = node->getValue32(); + sheetItem = (uint32)node->getValue32(); // slot empty if (!sheetItem) diff --git a/code/ryzom/client/src/interface_v3/view_polygon.cpp b/code/ryzom/client/src/interface_v3/view_polygon.cpp index 4d3213afe..4ed849c7c 100644 --- a/code/ryzom/client/src/interface_v3/view_polygon.cpp +++ b/code/ryzom/client/src/interface_v3/view_polygon.cpp @@ -102,7 +102,7 @@ void CViewPolygon::draw() for(uint k = 0; k < numTris; ++k) { winTris[k].getMinCorner(minCorner); - winTris[k].getMaxCorner(minCorner); + winTris[k].getMaxCorner(maxCorner); if (totallyOutside(minCorner, maxCorner, cx, cy, cw, ch)) continue; if (totallyInside(minCorner, maxCorner, cx, cy, cw, ch)) { diff --git a/code/ryzom/client/src/interface_v3/view_text.cpp b/code/ryzom/client/src/interface_v3/view_text.cpp index a70b065a7..4714c8208 100644 --- a/code/ryzom/client/src/interface_v3/view_text.cpp +++ b/code/ryzom/client/src/interface_v3/view_text.cpp @@ -529,7 +529,7 @@ void CViewText::draw () // skip spaces before current word float firstSpace = currWord.NumSpaces * currLine.getSpaceWidth(); - sint line_width; + sint line_width = 0; if (_Underlined) { line_width = (sint)floorf(currLine.getWidthWithoutSpaces() + currLine.getSpaceWidth()); @@ -1452,7 +1452,7 @@ sint CViewText::getLineFromIndex(uint index, bool cursorDisplayedAtEndOfPrevious { CLine &currLine = *_Lines[i]; uint newCharIndex = charIndex + currLine.getNumChars() + currLine.getEndSpaces() + (currLine.getLF() ? 1 : 0); - if ((sint) newCharIndex > index) + if (newCharIndex > index) { if (i != 0 && cursorDisplayedAtEndOfPreviousLine && charIndex == index) { @@ -1611,7 +1611,7 @@ void CViewText::getCharacterPositionFromIndex(sint index, bool cursorAtPreviousL { // character is in currWord or the in spaces preceding it // check if the character is in the word - if ((sint) (index - charIndex) > currWord.NumSpaces) + if ((uint) (index - charIndex) > currWord.NumSpaces) { // get the x position ucstring subStr = currWord.Text.substr(0, index - charIndex - currWord.NumSpaces); @@ -2255,6 +2255,7 @@ void CViewText::buildFormatTagText(const ucstring &text, ucstring &textBuild, s uint textSize= (uint)text.size(); // Must herit all the props from old tags. CViewText::CFormatTag precTag; // set default. + precTag.Index = 0; for (uint i = 0; i < textSize;) { if(isColorTag(text, i, textSize)) diff --git a/code/ryzom/client/src/r2/displayer_visual.cpp b/code/ryzom/client/src/r2/displayer_visual.cpp index 14ec5661e..d0f2a0d21 100644 --- a/code/ryzom/client/src/r2/displayer_visual.cpp +++ b/code/ryzom/client/src/r2/displayer_visual.cpp @@ -211,13 +211,11 @@ void CDisplayerVisual::onAttrModified(const std::string &attrName, sint32 /* at TDisplayMode newDisplayMode = (TDisplayMode) value; if (newDisplayMode != _DisplayMode) { - /* - if (newDisplayMode == DisplayModeFrozen && getEditor().getSelectedInstance() == getDisplayedInstance()) - { - getEditor().setSelectedInstance(NULL); - } - */ -/* _DisplayMode = newDisplayMode; + //if (newDisplayMode == DisplayModeFrozen && getEditor().getSelectedInstance() == getDisplayedInstance()) + //{ + // getEditor().setSelectedInstance(NULL); + //} + //_DisplayMode = newDisplayMode; } } else diff --git a/code/ryzom/client/src/r2/displayer_visual_activity_sequence.cpp b/code/ryzom/client/src/r2/displayer_visual_activity_sequence.cpp index fc69f487a..c997c64a5 100644 --- a/code/ryzom/client/src/r2/displayer_visual_activity_sequence.cpp +++ b/code/ryzom/client/src/r2/displayer_visual_activity_sequence.cpp @@ -182,7 +182,7 @@ void CDisplayerVisualActivitySequence::update() nextDV->getSonsWorldPos2f(r1); if (!r0.empty() && !r1.empty()) { - CVector2f p0, p1; + CVector2f p0(0.f, 0.f), p1(0.f, 0.f); float bestDist = FLT_MAX; for(uint k = 0; k < r0.size(); ++k) { @@ -416,6 +416,8 @@ void CDisplayerVisualActivitySequence::onPostRender() _DecalColor = CV_FootStepDecalFocusedColor.get(); mapColor = CV_FootStepMapFocusedColor.get(); break; + default: + break; } for(uint k = 0; k < _WPCache.size(); ++k) { diff --git a/code/ryzom/client/src/r2/displayer_visual_group.cpp b/code/ryzom/client/src/r2/displayer_visual_group.cpp index d6bc3d983..071a1a474 100644 --- a/code/ryzom/client/src/r2/displayer_visual_group.cpp +++ b/code/ryzom/client/src/r2/displayer_visual_group.cpp @@ -689,10 +689,10 @@ void CDisplayerVisualGroup::onPreRender() baseColor = CV_UnselectedRegionColor.get(); break; case DisplayModeFrozen: - baseColor = baseColor = CV_FrozenRegionColor.get(); + baseColor = CV_FrozenRegionColor.get(); break; case DisplayModeLocked: - baseColor = baseColor = CV_LockedRegionColor.get(); + baseColor = CV_LockedRegionColor.get(); break; default: baseColor = CV_UnselectedRegionColor.get(); diff --git a/code/ryzom/client/src/r2/dmc/action_historic.cpp b/code/ryzom/client/src/r2/dmc/action_historic.cpp index b024c1c84..05ed9fdd4 100644 --- a/code/ryzom/client/src/r2/dmc/action_historic.cpp +++ b/code/ryzom/client/src/r2/dmc/action_historic.cpp @@ -366,7 +366,7 @@ void CActionHistoric::requestMoveNode(const std::string& instanceId, const std:: //==================================================================================== -CActionHistoric::CAction::CAction(const ucstring &name) : _Name(name), _Completed(false), _FlushedCount(0), _Flushing(false) +CActionHistoric::CAction::CAction(const ucstring &name) : _Name(name), _FlushedCount(0), _Completed(false), _Flushing(false) { } diff --git a/code/ryzom/client/src/r2/dmc/client_edition_module.cpp b/code/ryzom/client/src/r2/dmc/client_edition_module.cpp index 785a0994d..b3c932a02 100644 --- a/code/ryzom/client/src/r2/dmc/client_edition_module.cpp +++ b/code/ryzom/client/src/r2/dmc/client_edition_module.cpp @@ -1506,7 +1506,10 @@ bool CClientEditionModule::loadUserComponent(const std::string& filename, bool m return false; } - fread((void*)&uncompressedFileLength, sizeof(uncompressedFileLength), 1, file); + if (fread((void*)&uncompressedFileLength, sizeof(uncompressedFileLength), 1, file) != 1) + { + nlwarning("Error while reading %s", filename.c_str()); + } fclose(file); diff --git a/code/ryzom/client/src/r2/dmc/com_lua_module.cpp b/code/ryzom/client/src/r2/dmc/com_lua_module.cpp index 9b95802b5..b4f6de3a4 100644 --- a/code/ryzom/client/src/r2/dmc/com_lua_module.cpp +++ b/code/ryzom/client/src/r2/dmc/com_lua_module.cpp @@ -2485,7 +2485,7 @@ sint CComLuaModule::luaGetCharIdMd5(lua_State* state) uint32 v = value % 16; value /= 16; char & c = ret[7-i]; - if (0 <= v && v <= 9) + if (v <= 9) { c = '0' + static_cast(v); } diff --git a/code/ryzom/client/src/r2/entity_sorter.cpp b/code/ryzom/client/src/r2/entity_sorter.cpp index a56130cda..d31de8847 100644 --- a/code/ryzom/client/src/r2/entity_sorter.cpp +++ b/code/ryzom/client/src/r2/entity_sorter.cpp @@ -235,7 +235,7 @@ void CEntitySorter::updateVisibleList() void CEntitySorter::clipEntitiesByDist() { CHECK_INTEGRITY - sint64 startTime; + sint64 startTime = 0; static volatile bool bench = false; if (bench) { diff --git a/code/ryzom/client/src/r2/entity_sorter.h b/code/ryzom/client/src/r2/entity_sorter.h index c25c0d5d3..1ba9b561c 100644 --- a/code/ryzom/client/src/r2/entity_sorter.h +++ b/code/ryzom/client/src/r2/entity_sorter.h @@ -82,7 +82,7 @@ private: float BlendValue; // current transparency (0.f hidden -> 1.f visible) CDisplayerVisualEntity *Displayer; public: - CVisibleEntity(CDisplayerVisualEntity *displayer = NULL) : Displayer(displayer), State(Appear), BlendValue(0.f) {} + CVisibleEntity(CDisplayerVisualEntity *displayer = NULL) : State(Appear), BlendValue(0.f), Displayer(displayer) {} }; // std::vector _SortTable; // *Table temporarily used for the sort (avoid reallocation of a new vector each time) diff --git a/code/ryzom/client/src/r2/palette_node.h b/code/ryzom/client/src/r2/palette_node.h index 6418669cd..772797469 100644 --- a/code/ryzom/client/src/r2/palette_node.h +++ b/code/ryzom/client/src/r2/palette_node.h @@ -18,7 +18,7 @@ #define R2_PALETTE_NODE_H -/* +#if 0 //#include "interface_user_data.h" #include "group_tree.h" #include "lua_object.h" @@ -32,7 +32,7 @@ namespace R2 /** * A palette node, to be attached to a CInterfaceElement. Makes a reference to a lua table describing the instance to be copied */ -/* + class CPaletteNode : public NLMISC::CRefCount { public: @@ -52,6 +52,6 @@ private: } // R2 -*/ +#endif #endif diff --git a/code/ryzom/tools/leveldesign/prim_export/main.cpp b/code/ryzom/tools/leveldesign/prim_export/main.cpp index b993caea1..c8fe449ce 100644 --- a/code/ryzom/tools/leveldesign/prim_export/main.cpp +++ b/code/ryzom/tools/leveldesign/prim_export/main.cpp @@ -127,7 +127,7 @@ public: for (i=(uint)strlen(msg); i<79; i++) msg[i]=' '; msg[i]=0; - printf (msg); + printf ("%s", msg); printf ("\r"); time = currentTime;