Changed: #825 Remove all warning when compiling Ryzom

This commit is contained in:
kervala 2010-10-18 09:44:19 +02:00
parent 4a281f0d1b
commit 933395109b
16 changed files with 31 additions and 60 deletions

View file

@ -223,23 +223,3 @@ void CAttackListManager::buildLinkFXs()
{
_Links.init("links.id_to_string_array", _AnimationSet, false /* must not delete animset, owned by this object */);
}

View file

@ -486,7 +486,7 @@ void CBGDownloaderAccess::CDownloadCoTask::restartDownloader()
uint tryCounter = 1;
for (;;)
{
nlwarning("Launching downloader: try number %d", (int) tryCounter++);
nlwarning("Launching downloader: try number %u", tryCounter++);
// now we can create the message queue because we are sure that it will reach the good app
Parent->_DownloaderMsgQueue.init(HInstance, BGDownloader::ClientWndID, BGDownloader::DownloaderWndID);
sleep(200);

View file

@ -19,6 +19,11 @@
#ifndef CDB_H
#define CDB_H
// misc
#include "nel/misc/types_nl.h"
#include "nel/misc/smart_ptr.h"
#include "nel/misc/string_mapper.h"
#include <libxml/parser.h>
namespace NLMISC

View file

@ -66,8 +66,8 @@ struct CClientConfig
bool SaveConfig;
/// Window position in windowed mode
sint32 PositionX;
sint32 PositionY;
sint32 PositionX;
sint32 PositionY;
/// Window frequency
uint Frequency;

View file

@ -134,7 +134,7 @@ uint CColorSlotManager::addSlot(const TStringVect &slotDescs)
_Slots.push_back(slotDescs);
for(uint k = 0; k < slotDescs.size(); ++k)
{
NLMISC::strupr(_Slots.back()[k]);
_Slots.back()[k] = NLMISC::toUpper(_Slots.back()[k]);
}
return (uint)_Slots.size() - 1;
}
@ -327,10 +327,9 @@ bool CColorSlotManager::addSlotsFromConfigFile(NLMISC::CConfigFile &cf, uint &st
{
return false;
}
uint startSlot = (uint)_Slots.size();
_Slots.resize(_Slots.size() + mask_extensions->size());
/// For each kind of mask, build a slot
for (uint k = 0; k < (uint) mask_extensions->size(); ++k)

View file

@ -22,14 +22,6 @@
/////////////
#include "stdpch.h" // First include for pre-compiled headers.
#include <limits>
// OS.
#ifdef NL_OS_WINDOWS
# define NOMINMAX
# include <windows.h>
#endif
// Misc
#include "nel/misc/file.h"
#include "nel/misc/async_file_manager.h"
@ -689,6 +681,3 @@ bool verboseVPAdvanceTest(CEntityCL *en, uint32 form)
return false;
}
}

View file

@ -965,7 +965,7 @@ void CFarTP::requestReturnToPreviousSession(TSessionId rejectedSessionId)
void CFarTP::requestReconnection()
{
_ReselectingChar = true;
requestFarTPToSession(TSessionId(~0u), ~0, CFarTP::JoinMainland, false);
requestFarTPToSession(TSessionId(std::numeric_limits<uint16>::max()), std::numeric_limits<uint8>::max(), CFarTP::JoinMainland, false);
}
@ -1060,9 +1060,10 @@ void CFarTP::disconnectFromPreviousShard()
// Play music and fade out the Game Sound
if (SoundMngr)
{
SoundMngr->playEventMusic(ClientCfg.SoundOutGameMusic, CSoundManager::LoadingMusicXFade, true); // Loading Music Loop.ogg
SoundMngr->fadeOutGameSound(ClientCfg.SoundTPFade);
// Loading Music Loop.ogg
LoadingMusic = ClientCfg.SoundOutGameMusic;
SoundMngr->playEventMusic(LoadingMusic, CSoundManager::LoadingMusicXFade, true);
SoundMngr->fadeOutGameSound(ClientCfg.SoundTPFade);
}
// Change the tips

View file

@ -142,7 +142,7 @@ void CFXManager::update()
while (!_DeferredFXByDate.empty())
{
if (T1 < (sint64)_DeferredFXByDate.begin()->first) break;
if (T1 < (uint)_DeferredFXByDate.begin()->first) break;
const CDeferredFX &fx = _DeferredFXByDate.begin()->second;
NL3D::UParticleSystemInstance fxInstance = instantFX(fx.FXName, fx.TimeOut);
if (!fxInstance.empty())
@ -231,7 +231,7 @@ void CFXManager::deferFX(const std::string &fxName, const NLMISC::CMatrix &matri
fx.FXName = fxName;
fx.Matrix = matrix;
fx.TimeOut = timeOut;
_DeferredFXByDate.insert(std::make_pair(T1 + sint64(1000.f * delayInSeconds), fx));
_DeferredFXByDate.insert(std::make_pair(T1 + uint64(1000.f * delayInSeconds), fx));
}

View file

@ -847,7 +847,7 @@ void CGameContextMenu::updateContextMenuTalkEntries(uint options)
{
if (ClientCfg.Local)
{
options = ~0; // in local mode, force all options to be shown (for debug)
options = std::numeric_limits<uint>::max(); // in local mode, force all options to be shown (for debug)
}
// news
_OkTextNews= ((options & (1 << BOTCHATTYPE::NewsFlag)));

View file

@ -743,7 +743,7 @@ void CViewRenderer::loadTextures (const std::string &textureFileName, const std:
image.UVMax.U = uvMaxU;
image.UVMax.V = uvMaxV;
sTGAname = tgaName;
sTGAname = strlwr(sTGAname);
sTGAname = toLower(sTGAname);
string::size_type stripPng = sTGAname.find(".png");
if (stripPng != string::npos)
{

View file

@ -531,9 +531,6 @@ void initLibWWW()
static bool initialized = false;
if (!initialized)
{
// log all libwww
//WWW_TraceFlag = SHOW_ALL_TRACE;
//HTProfile_newNoCacheClient("Ryzom", "1.1");
/* Need our own trace and print functions */

View file

@ -714,7 +714,7 @@ void CNetworkConnection::setMsPerTick(sint32 msPerTick)
bool CNetworkConnection::update()
{
#ifdef ENABLE_INCOMING_MSG_RECORDER
if ( _NextClientTickToReplay == ~0 )
if ( _NextClientTickToReplay == std::numeric_limits<uint32>::max() )
{
setReplayingMode( false );
return false;
@ -881,7 +881,7 @@ bool CNetworkConnection::buildStream( CBitMemStream &msgin )
if ( _RecordedMessagesIn.eof() )
{
// Nothing more to load
_NextClientTickToReplay = ~0;
_NextClientTickToReplay = std::numeric_limits<uint32>::max();
nlinfo( "Nothing more to replay, end of replaying" );
}
else
@ -1147,10 +1147,10 @@ void CNetworkConnection::receiveSystemSync(CBitMemStream &msgin)
//_MsPerTick = 100; // initial values
#ifdef HALF_FREQUENCY_SENDING_TO_CLIENT
#pragma message ("HALF_FREQUENCY_SENDING_TO_CLIENT")
//#pragma message ("HALF_FREQUENCY_SENDING_TO_CLIENT")
_CurrentServerTick = _Synchronize+_CurrentReceivedNumber*2;
#else
#pragma message ("FULL_FREQUENCY_SENDING_TO_CLIENT")
//#pragma message ("FULL_FREQUENCY_SENDING_TO_CLIENT")
_CurrentServerTick = _Synchronize+_CurrentReceivedNumber;
#endif
_CurrentClientTick = uint32(_CurrentServerTick - (_LCT+_MsPerTick)/_MsPerTick);

View file

@ -121,7 +121,6 @@ void drawLoadingBitmap (float progress)
CQuadUV quad;
uint wh = Driver->getWindowHeight();
uint ww = Driver->getWindowWidth();
//nlinfo("%d x %d", ww, wh);
float x1 = 0;
float y1 = 0;
float x2 = 1;
@ -441,3 +440,4 @@ void CProgress::finish()
// stop system dependent progress bar
CSystemUtils::updateProgressBar(1, 0);
}

View file

@ -1208,15 +1208,15 @@ void CStringManagerClient::initI18NSpecialWords(const std::string &languageCode)
// Get the women name index if possible.
uint womenNameColIndex;
if( !ws.findCol(womenNameColIdent, womenNameColIndex) )
womenNameColIndex= ~0;
womenNameColIndex= std::numeric_limits<uint>::max();
// Get the description index if possible.
uint descColIndex;
if( !ws.findCol(descColIdent, descColIndex) )
descColIndex= ~0;
descColIndex= std::numeric_limits<uint>::max();
uint descColIndex2;
if( !ws.findCol(descColIdent2, descColIndex2) )
descColIndex2= ~0;
descColIndex2= std::numeric_limits<uint>::max();
// For all rows minus the first header one.
for(uint j=1;j<ws.size();j++)
@ -1246,7 +1246,7 @@ void CStringManagerClient::initI18NSpecialWords(const std::string &languageCode)
while(strFindReplace(_SpecItem_TempMap[keyStr].Name, "\\n", "\n"));
// insert in map of Women Name if OK.
if(womenNameColIndex!=((uint)~0))
if(womenNameColIndex!=std::numeric_limits<uint>::max())
{
const ucstring &womenName= ws.getData(j, womenNameColIndex);
_SpecItem_TempMap[keyStr].WomenName= womenName;
@ -1255,7 +1255,7 @@ void CStringManagerClient::initI18NSpecialWords(const std::string &languageCode)
}
// insert in map of Description if OK.
if(descColIndex!=((uint)~0))
if(descColIndex!=std::numeric_limits<uint>::max())
{
const ucstring &desc= ws.getData(j, descColIndex);
_SpecItem_TempMap[keyStr].Desc= desc;
@ -1264,7 +1264,7 @@ void CStringManagerClient::initI18NSpecialWords(const std::string &languageCode)
}
// insert in map of Description2 if OK.
if(descColIndex2!=((uint)~0))
if(descColIndex2!=std::numeric_limits<uint>::max())
{
const ucstring &desc= ws.getData(j, descColIndex2);
_SpecItem_TempMap[keyStr].Desc2= desc;

View file

@ -63,7 +63,7 @@ CBNPFileVersion::CBNPFileVersion()
_FileSize= 0;
_7ZFileSize=0;
_PatchSize= 0;
_VersionNumber= ~0u;
_VersionNumber= std::numeric_limits<uint32>::max();
}
// setup record contents from a file name and version number

View file

@ -21,7 +21,7 @@
#include "nel/misc/types_nl.h"
#include <string.h>
#include <string>
namespace SCORES
{