Changed: #825 Remove all warnings when compiling Ryzom

This commit is contained in:
kervala 2010-09-04 19:46:43 +02:00
parent 9b84af242e
commit 933e37cdf5
3 changed files with 14 additions and 14 deletions

View file

@ -53,7 +53,7 @@ std::string decodeDbPathId(const std::string& pathid)
std::string shard("");
uint id;
uint p = pathid.find(':');
string::size_type p = pathid.find(':');
if (p == std::string::npos)
{

View file

@ -247,7 +247,7 @@ bool CLogAnalyserService::getQueryResult(uint32 queryId, std::string& result, si
if (filter.empty())
{
numpage = (_Finished[i]->Result.size()+linePerPage-1) / linePerPage;
numpage = ((uint)_Finished[i]->Result.size()+linePerPage-1) / linePerPage;
if (page >= (sint)numpage)
page = numpage-1;
@ -329,7 +329,7 @@ bool CLogAnalyserService::getQueryResult(uint32 queryId, std::string& result, si
}
// refresh numpage
numpage = (matchingLines.size()+linePerPage-1) / linePerPage;
numpage = ((uint)matchingLines.size()+linePerPage-1) / linePerPage;
if (page >= (sint)numpage)
page = numpage-1;
@ -374,7 +374,7 @@ void CLogAnalyserService::getQueryList(std::vector<CQuery*>& queries)
{
_Mutex.enter();
sint i;
for (i=_Requests.size()-1; i>=0; --i)
for (i=(sint)_Requests.size()-1; i>=0; --i)
{
CQuery* q = _Requests[i];
q->State = QueryAwaiting;
@ -387,7 +387,7 @@ void CLogAnalyserService::getQueryList(std::vector<CQuery*>& queries)
queries.push_back(_Current);
}
for (i=_Finished.size()-1; i>=0; --i)
for (i=(sint)_Finished.size()-1; i>=0; --i)
{
CQuery* q = _Finished[i];
q->State = QueryTreated;
@ -455,7 +455,7 @@ void cbResult(CMemStream &msgin, TSockId host)
//nlinfo("received query '%s'", idStr.c_str());
uint pos = idStr.find("%!");
string::size_type pos = idStr.find("%!");
if (pos != std::string::npos)
{
// parse input

View file

@ -52,7 +52,7 @@ void buildRaceAnimNames(std::vector<string> &raceAnimNames, const std::string &a
}
// ***************************************************************************
uint findAnimName(const string &lineLwr, const std::vector<string> &raceAnimNames)
string::size_type findAnimName(const string &lineLwr, const std::vector<string> &raceAnimNames)
{
// line Must contains Name="filename", else CAN BE A LOAD CHAR ANIMATION!!!!
if(lineLwr.find("name=\"filename\"")==string::npos)
@ -61,11 +61,11 @@ uint findAnimName(const string &lineLwr, const std::vector<string> &raceAnimName
// in the animset, the original file can be a "tr_" ... Not necessarily a "fy_"
for(uint i=0;i<raceAnimNames.size();i++)
{
uint pos= lineLwr.find(raceAnimNames[i]);
string::size_type pos= lineLwr.find(raceAnimNames[i]);
if(pos!=string::npos)
return pos;
}
return -1;
return string::npos;
}
// ***************************************************************************
@ -160,8 +160,8 @@ void makeAnimByRace(const std::string &animSetFile, const std::vector<string> &a
raceRestrictionFound= true;
// Find the anim name?
uint nameIndexInLine= findAnimName(lineLwr, raceAnimNames);
if(nameIndexInLine!=-1)
string::size_type nameIndexInLine= findAnimName(lineLwr, raceAnimNames);
if(nameIndexInLine!=string::npos)
{
// Find the enclosing struct
nlassert(lastStructLine!=0);
@ -220,9 +220,9 @@ void makeAnimByRace(const std::string &animSetFile, const std::vector<string> &a
// Append for each race
for(uint k=0;k<raceAnimNames.size();k++)
{
appendRaceAnim(animSetText, nextBlock, copyText, nameLineInBlock, nameIndexInLine, raceAnimNames[k]);
appendRaceAnim(animSetText, nextBlock, copyText, nameLineInBlock, (uint)nameIndexInLine, raceAnimNames[k]);
// nextBlock is then shifted
nextBlock+= copyText.size();
nextBlock+= (uint)copyText.size();
}
someChangeDone= true;
@ -248,7 +248,7 @@ void makeAnimByRace(const std::string &animSetFile, const std::vector<string> &a
{
string str= animSetText[i];
str+= "\n";
oFile.serialBuffer((uint8*)str.c_str(), str.size());
oFile.serialBuffer((uint8*)str.c_str(), (uint)str.size());
}
}
}