Changed: #825 Remove all warning when compiling Ryzom
This commit is contained in:
parent
c3e7de0df1
commit
3f10420ccc
10 changed files with 52 additions and 51 deletions
|
@ -510,7 +510,6 @@ void checkUnderCursor()
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
SlotUnderCursor = CLFECOMMON::INVALID_SLOT;
|
||||
}
|
||||
|
@ -839,5 +838,5 @@ void contextBuildTotem(bool rightClick, bool dblClick)
|
|||
return;
|
||||
if( ClientCfg.DblClickMode && !dblClick)
|
||||
return;
|
||||
UserEntity->moveToTotemBuildingPhrase(SlotUnderCursor,MaxExtractionDistance, ~0, ~0, true );
|
||||
UserEntity->moveToTotemBuildingPhrase(SlotUnderCursor,MaxExtractionDistance, std::numeric_limits<uint>::max(), std::numeric_limits<uint>::max(), true );
|
||||
}// contextBuildTotem //
|
||||
|
|
|
@ -35,6 +35,9 @@
|
|||
#include "nel/misc/time_nl.h"
|
||||
#include "nel/misc/vector.h"
|
||||
#include "nel/misc/file.h"
|
||||
#include "nel/misc/aabbox.h"
|
||||
// 3D
|
||||
#include "nel/3d/u_instance.h"
|
||||
// Std.
|
||||
#include <vector>
|
||||
|
||||
|
|
|
@ -910,6 +910,7 @@ protected:
|
|||
std::string _PermanentStatutIcon;
|
||||
// Has reserved title?
|
||||
bool _HasReservedTitle;
|
||||
|
||||
// Extended Name
|
||||
ucstring _NameEx;
|
||||
// String ID
|
||||
|
|
|
@ -445,7 +445,6 @@ void HandleSystemCursorCapture(const CEvent &event)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// *********************************************************************************
|
||||
bool IsSystemCursorInClientArea()
|
||||
{
|
||||
|
@ -506,8 +505,6 @@ bool IsSystemCursorInClientArea()
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
sint CNiceInputAuto::_Count = 0;
|
||||
|
||||
|
||||
|
|
|
@ -327,10 +327,10 @@ uint32 CBotChatPageTrade::getCurrItemQuantity() const
|
|||
// TODO: edit box in faction points?
|
||||
CGroupEditBox *ed = dynamic_cast<CGroupEditBox *>(ig->getGroup("header_opened:standard_price:quantity:edit:eb"));
|
||||
if (!ed) return ~0;
|
||||
int intQuantity;
|
||||
uint32 intQuantity;
|
||||
if (fromString(ed->getInputString().toString(), intQuantity))
|
||||
{
|
||||
return (uint32) intQuantity;
|
||||
return intQuantity;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -375,7 +375,7 @@ uint32 CBotChatPageTrade::getCurrItemPriceResale() const
|
|||
// ***************************************************************************************
|
||||
uint64 CBotChatPageTrade::getCurrItemPrice(bool mulByFame) const
|
||||
{
|
||||
if (!_CurrItemSheet) return ~0;
|
||||
if (!_CurrItemSheet) return std::numeric_limits<uint64>::max();
|
||||
if (_BuyDlgOn && (_BuyMean == MoneyGuildXP || _BuyMean == GuildMoneyGuildXP || _BuyMean == GuildMoney) )
|
||||
{
|
||||
if (_BuyMean == MoneyGuildXP)
|
||||
|
@ -419,7 +419,7 @@ uint64 CBotChatPageTrade::getCurrItemPrice(bool mulByFame) const
|
|||
}
|
||||
}
|
||||
}
|
||||
return ~0;
|
||||
return std::numeric_limits<uint64>::max();
|
||||
}
|
||||
|
||||
// ***************************************************************************************
|
||||
|
@ -440,7 +440,7 @@ uint64 CBotChatPageTrade::getCurrItemXP() const
|
|||
return 0; // By now no need for XP even if xp guild required
|
||||
}
|
||||
|
||||
return ~0;
|
||||
return std::numeric_limits<uint64>::max();
|
||||
}
|
||||
|
||||
|
||||
|
@ -809,11 +809,11 @@ void CBotChatPageTrade::updateTradeModal()
|
|||
if (cantTradeButton) cantTradeButton->setText(CI18N::get("uiWontBuyThis"));
|
||||
if (cantTradeButton) cantTradeButton->setDefaultContextHelp(CI18N::get("uittWontBuyThis"));
|
||||
}
|
||||
else if (_SellDlgOn && priceWithoutFame == ~0)
|
||||
else if (_SellDlgOn && priceWithoutFame == std::numeric_limits<uint64>::max())
|
||||
{
|
||||
if (cantTradeButton) cantTradeButton->setText(CI18N::get("uiPriceNotReceived"));
|
||||
}
|
||||
else if (quantity == 0 || quantity == ~0)
|
||||
else if (quantity == 0 || quantity == std::numeric_limits<uint32>::max())
|
||||
{
|
||||
if (cantTradeButton) cantTradeButton->setText(CI18N::get("uiBadQuantity"));
|
||||
if (cantTradeButton) cantTradeButton->setDefaultContextHelp(CI18N::get("uittBadQuantity"));
|
||||
|
@ -1100,7 +1100,7 @@ bool CBotChatPageTrade::isTradeValid( bool enableResale ) const
|
|||
getCurrItemFactionTypePoints(fpType, fpCost);
|
||||
|
||||
// if price/quantity is valid
|
||||
bool validSetup= priceWithoutFame != ~0 && quantity != ~0 && quantity != 0;
|
||||
bool validSetup= priceWithoutFame != std::numeric_limits<uint64>::max() && quantity != std::numeric_limits<uint32>::max() && quantity != 0;
|
||||
if(validSetup && _BuyMean==MoneyFactionPoints)
|
||||
{
|
||||
// valid if at least one price type is not 0
|
||||
|
@ -1179,7 +1179,7 @@ void CBotChatPageTrade::confirmTrade( bool enableResale )
|
|||
{
|
||||
uint32 quantity = getCurrItemQuantity();
|
||||
sint32 resalePrice = resaleEnabled ? getCurrItemPriceResale() : 0; // getCurrItemPriceResale() returns 0 is !_ResaleEdit
|
||||
if (quantity != ~0)
|
||||
if (quantity != std::numeric_limits<uint32>::max())
|
||||
{
|
||||
uint16 u16Quantity = (uint16) quantity;
|
||||
// The Item bought is a SPhrase ?
|
||||
|
@ -2120,7 +2120,7 @@ void CBotChatPageTrade::startDestroyItemDialog()
|
|||
|
||||
// setup the quantity to destroy (if edited correctly)
|
||||
uint32 quantity= getCurrItemQuantity();
|
||||
if(quantity==0 || quantity==~0)
|
||||
if(quantity==0 || quantity==std::numeric_limits<uint32>::max())
|
||||
return;
|
||||
// if quantity check, maximize with it (if user entered to big value...)
|
||||
if(_QuantityCheck)
|
||||
|
@ -2144,7 +2144,7 @@ void CBotChatPageTrade::confirmDestroyItemDialog()
|
|||
// get the quantity destroyed
|
||||
uint32 quantity= getCurrItemQuantity();
|
||||
// if correct quantity
|
||||
if(quantity!=0 && quantity!=~0)
|
||||
if(quantity!=0 && quantity!=std::numeric_limits<uint32>::max())
|
||||
{
|
||||
// if quantity check, maximize with it (if user entered too big value...)
|
||||
if(_QuantityCheck)
|
||||
|
@ -2190,7 +2190,7 @@ void CBotChatPageTrade::confirmDestroyItemDialog()
|
|||
pIM->disableModalWindow();
|
||||
|
||||
// if the quantity entered was correct
|
||||
if(quantity!=0 && quantity!=~0)
|
||||
if(quantity!=0 && quantity!=std::numeric_limits<uint32>::max())
|
||||
{
|
||||
// close also the container modal
|
||||
endTradeModal();
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#define RZ_CTRL_EDITBOX_H
|
||||
|
||||
#include "interface_group.h"
|
||||
#include "nel/3d/u_texture.h"
|
||||
|
||||
|
||||
class CEventDescriptor;
|
||||
|
|
|
@ -41,6 +41,8 @@
|
|||
#include "game_share/lift_icons.h"
|
||||
|
||||
#include "../r2/editor.h"
|
||||
#include "chat_window.h"
|
||||
#include "people_interraction.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace NLMISC;
|
||||
|
|
|
@ -459,7 +459,7 @@ void CInterfaceManager::initLogin()
|
|||
}
|
||||
|
||||
nldebug("Textures Login Interface");
|
||||
|
||||
|
||||
for (vector<string>::iterator it = ClientCfg.TexturesLoginInterface.begin(), end = ClientCfg.TexturesLoginInterface.end(); it != end; ++it)
|
||||
{
|
||||
nldebug("Textures Login Interface: %s", (*it).c_str());
|
||||
|
@ -549,13 +549,13 @@ void CInterfaceManager::initOutGame()
|
|||
}
|
||||
|
||||
nldebug("Textures OutGame Interface");
|
||||
|
||||
|
||||
for (vector<string>::iterator it = ClientCfg.TexturesOutGameInterface.begin(), end = ClientCfg.TexturesOutGameInterface.end(); it != end; ++it)
|
||||
{
|
||||
nldebug("Textures OutGame Interface: %s", (*it).c_str());
|
||||
loadTextures(*it + ".tga", *it + ".txt", false);
|
||||
}
|
||||
|
||||
|
||||
for (vector<string>::iterator it = ClientCfg.TexturesOutGameInterfaceDXTC.begin(), end = ClientCfg.TexturesOutGameInterfaceDXTC.end(); it != end; ++it)
|
||||
{
|
||||
nldebug("Textures OutGame Interface DXTC: %s", (*it).c_str());
|
||||
|
@ -1667,7 +1667,7 @@ bool CInterfaceManager::loadConfig (const string &filename)
|
|||
|
||||
// *** Apply the NPC icon display mode
|
||||
CNPCIconCache::getInstance().init(!ClientCfg.R2EDEnabled && getDbProp("UI:SAVE:INSCENE:FRIEND:MISSION_ICON")->getValueBool());
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -2189,7 +2189,7 @@ CInterfaceGroup *CInterfaceManager::getWindowForActiveMasterGroup(const std::str
|
|||
// ----------------------------------------------------------------------------
|
||||
void CInterfaceManager::updateTooltipCoords()
|
||||
{
|
||||
updateTooltipCoords(_CurCtrlContextHelp);
|
||||
updateTooltipCoords(_CurCtrlContextHelp);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -2239,7 +2239,7 @@ void CInterfaceManager::updateTooltipCoords(CCtrlBase *newCtrl)
|
|||
yParent = newCtrl->getYReal();
|
||||
wParent = newCtrl->getWReal();
|
||||
hParent = newCtrl->getHReal();
|
||||
// Additionaly, must clip this ctrl with its parent
|
||||
// Additionaly, must clip this ctrl with its parent
|
||||
// (else animals are buggy for instance)
|
||||
CInterfaceGroup *parent= newCtrl->getParent();
|
||||
if(parent)
|
||||
|
@ -2258,7 +2258,7 @@ void CInterfaceManager::updateTooltipCoords(CCtrlBase *newCtrl)
|
|||
}
|
||||
|
||||
|
||||
// **** resolve auto posref
|
||||
// **** resolve auto posref
|
||||
uint clampCount = adjustTooltipPosition(newCtrl, win, newCtrl->getToolTipParentPosRef(), newCtrl->getToolTipPosRef(), xParent, yParent, wParent, hParent);
|
||||
if (clampCount != 0)
|
||||
{
|
||||
|
@ -2270,7 +2270,7 @@ void CInterfaceManager::updateTooltipCoords(CCtrlBase *newCtrl)
|
|||
adjustTooltipPosition(newCtrl, win, newCtrl->getToolTipParentPosRef(), newCtrl->getToolTipPosRef(), xParent, yParent, wParent, hParent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2364,7 +2364,7 @@ void CInterfaceManager::drawContextHelp ()
|
|||
{
|
||||
// enable
|
||||
_CurCtrlContextHelp = newCtrl->getId();
|
||||
newCtrl->invalidateCoords();
|
||||
newCtrl->invalidateCoords();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2376,7 +2376,7 @@ void CInterfaceManager::drawContextHelp ()
|
|||
// **** display
|
||||
// ***************
|
||||
if(_CurCtrlContextHelp)
|
||||
{
|
||||
{
|
||||
CInterfaceGroup *groupContextHelp = getWindowForActiveMasterGroup(_CurCtrlContextHelp->getContextHelpWindowName());
|
||||
if(groupContextHelp)
|
||||
{
|
||||
|
@ -2384,12 +2384,12 @@ void CInterfaceManager::drawContextHelp ()
|
|||
* If this is the case, we just disable it, unless the tooltip was generated by the current modal window
|
||||
*/
|
||||
if (!_ModalStack.empty())
|
||||
{
|
||||
{
|
||||
CInterfaceGroup *mw = _ModalStack.back().ModalWindow;
|
||||
if (mw && mw->isIn(*groupContextHelp))
|
||||
{
|
||||
{
|
||||
if (_CurCtrlContextHelp->isSonOf(mw))
|
||||
{
|
||||
{
|
||||
groupContextHelp->executeLuaScriptOnDraw();
|
||||
groupContextHelp->draw ();
|
||||
// flush layers
|
||||
|
@ -2397,7 +2397,7 @@ void CInterfaceManager::drawContextHelp ()
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
groupContextHelp->executeLuaScriptOnDraw();
|
||||
groupContextHelp->draw ();
|
||||
// flush layers
|
||||
|
@ -2405,7 +2405,7 @@ void CInterfaceManager::drawContextHelp ()
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
groupContextHelp->executeLuaScriptOnDraw();
|
||||
groupContextHelp->draw ();
|
||||
// flush layers
|
||||
|
@ -2420,11 +2420,11 @@ void CInterfaceManager::drawContextHelp ()
|
|||
}
|
||||
|
||||
void CInterfaceManager::setContextHelpActive(bool active)
|
||||
{
|
||||
{
|
||||
if (!active)
|
||||
{
|
||||
disableContextHelp();
|
||||
}
|
||||
disableContextHelp();
|
||||
}
|
||||
_ContextHelpActive = active;
|
||||
}
|
||||
|
||||
|
@ -2675,7 +2675,7 @@ bool CInterfaceManager::handleEvent (const CEventDescriptor& event)
|
|||
CInterfaceGroup *tw= getTopWindow();
|
||||
if(tw && !tw->getAHOnEnter().empty())
|
||||
{
|
||||
// if the captured keypborad is in this Modal window, then must handle him in priority
|
||||
// if the captured keyboard is in this Modal window, then must handle him in priority
|
||||
if(_CaptureKeyboard && _CaptureKeyboard->getRootWindow()==tw)
|
||||
{
|
||||
bool result = _CaptureKeyboard->handleEvent(event);
|
||||
|
@ -5494,8 +5494,6 @@ class CHandlerEmote : public IActionHandler
|
|||
public:
|
||||
void execute (CCtrlBase * /* pCaller */, const std::string &sParams)
|
||||
{
|
||||
|
||||
|
||||
// An emote is 2 things : a phrase and an animation
|
||||
// Phrase is the phrase that server returns in chat system
|
||||
// Behav is the animation played
|
||||
|
@ -5524,7 +5522,7 @@ public:
|
|||
behavToSend = MBEHAV::IDLE;
|
||||
}
|
||||
|
||||
/* Emotes forbidden when dead, emotes with behav forbidden when
|
||||
/* Emotes forbidden when dead, emotes with behav forbidden when
|
||||
* stunned or swimming */
|
||||
if ( ( behavToSend != MBEHAV::IDLE && (isSwimming() || isStunned() || isDead() ) ) )
|
||||
{
|
||||
|
|
|
@ -2872,7 +2872,6 @@ void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// following lines added by Sadge to ensure that the correct file gets patched
|
||||
// string SourceNameXDFull;
|
||||
// if (NLMISC::CFile::fileExists(pPM->ClientDataPath + SourceNameXD)) SourceNameXDFull = pPM->ClientDataPath + SourceNameXD;
|
||||
|
@ -2898,9 +2897,6 @@ void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP)
|
|||
pPM->deleteFile(SourceName);
|
||||
pPM->deleteFile(PatchName);
|
||||
|
||||
|
||||
|
||||
|
||||
if (j > 0)
|
||||
{
|
||||
pPM->deleteFile(SourceNameXD, false, false); // File can exists if bad BNP loading
|
||||
|
@ -3210,9 +3206,11 @@ bool CPatchManager::download(const std::string& patchFullname, const std::string
|
|||
NLMISC::CFile::createDirectoryTree( NLMISC::CFile::getPath(sourceFullname) );
|
||||
|
||||
// try to download
|
||||
try {
|
||||
try
|
||||
{
|
||||
pPM->getServerFile(patchFullname, false, patchName);
|
||||
} catch ( const std::exception& e)
|
||||
}
|
||||
catch ( const std::exception& e)
|
||||
{
|
||||
nlwarning("%s", e.what());
|
||||
pPM->setState(true, ucstring(e.what()) );
|
||||
|
@ -3468,12 +3466,14 @@ void CDownloadThread::run()
|
|||
// create directory tree
|
||||
NLMISC::CFile::createDirectoryTree(path);
|
||||
// Try to download, rename, applyDate and send error msg to gui in case of error
|
||||
try {
|
||||
try
|
||||
{
|
||||
pPM->getServerFile(patchName, false, tmpFile);
|
||||
NLMISC::CFile::moveFile(finalFile.c_str(), tmpFile.c_str());
|
||||
|
||||
pPM->applyDate(finalFile, _Entries[first].Timestamp);
|
||||
} catch ( const std::exception& e)
|
||||
}
|
||||
catch ( const std::exception& e)
|
||||
{
|
||||
nlwarning("%s", e.what());
|
||||
pPM->setState(true, ucstring(e.what()) );
|
||||
|
|
|
@ -1329,7 +1329,7 @@ void CUserEntity::resetAnyMoveTo()
|
|||
if(_MoveToAction==CUserEntity::CombatPhrase || _MoveToAction==CUserEntity::ExtractRM)
|
||||
{
|
||||
// the clientExecute has not been called in case of "ExtractRM autoFind"
|
||||
bool autoFindExtractRM= _MoveToAction==CUserEntity::ExtractRM && _MoveToPhraseMemoryLine == (uint)~0;
|
||||
bool autoFindExtractRM= _MoveToAction==CUserEntity::ExtractRM && _MoveToPhraseMemoryLine == std::numeric_limits<uint>::max();
|
||||
if(!autoFindExtractRM)
|
||||
{
|
||||
CSPhraseManager *pPM= CSPhraseManager::getInstance();
|
||||
|
@ -3758,7 +3758,7 @@ void CUserEntity::extractRM()
|
|||
CSPhraseManager *pm = CSPhraseManager::getInstance();
|
||||
uint index;
|
||||
uint memoryLine;
|
||||
bool autoFindPhrase = (_MoveToPhraseMemoryLine == (uint)~0);
|
||||
bool autoFindPhrase = (_MoveToPhraseMemoryLine == std::numeric_limits<uint>::max());
|
||||
if ( ! autoFindPhrase )
|
||||
{
|
||||
// Use clicked phrase
|
||||
|
@ -3773,7 +3773,7 @@ void CUserEntity::extractRM()
|
|||
if ( ! findExtractionActionInMemory( pm, bm, memoryLine, index ) )
|
||||
{
|
||||
// Search in other memory bar lines (because the auto-equip does not set the current line at once)
|
||||
memoryLine = ~0;
|
||||
memoryLine = std::numeric_limits<uint>::max();
|
||||
uint nbLines = pm->getNbMemoryLines();
|
||||
for ( uint j=0; j!=nbLines; ++j )
|
||||
{
|
||||
|
@ -3788,7 +3788,7 @@ void CUserEntity::extractRM()
|
|||
}
|
||||
}
|
||||
|
||||
if ( memoryLine != (uint)~0 )
|
||||
if ( memoryLine != std::numeric_limits<uint>::max() )
|
||||
{
|
||||
// Open the forage (but not for care actions). Necessary for the case of redoing an extraction after a Drop All on the same source.
|
||||
uint32 phraseId = pm->getMemorizedPhrase( memoryLine, index );
|
||||
|
|
Loading…
Reference in a new issue