Changed: #825 Remove all warning when compiling Ryzom on Linux
This commit is contained in:
parent
783f5cdf29
commit
eba2da50b7
19 changed files with 50 additions and 50 deletions
|
@ -110,7 +110,7 @@ void addShadowMesh(T *meshIn, float paramFaceRatio, sint paramMaxFace, const st
|
|||
map<CShadowVertex, uint> shadowVertexMap;
|
||||
uint numMerged= 0;
|
||||
// Skip Geomorphs.
|
||||
for(i=geomorphs.size();i<vertexUsed.size();i++)
|
||||
for(i=(uint)geomorphs.size();i<vertexUsed.size();i++)
|
||||
{
|
||||
// If this vertex is used.
|
||||
if(vertexUsed[i]!=-1)
|
||||
|
@ -140,7 +140,7 @@ void addShadowMesh(T *meshIn, float paramFaceRatio, sint paramMaxFace, const st
|
|||
if(it==shadowVertexMap.end())
|
||||
{
|
||||
// Append
|
||||
uint index= shadowVertices.size();
|
||||
uint index= (uint)shadowVertices.size();
|
||||
vertexToVSkin[i]= index;
|
||||
shadowVertices.push_back(shadowVert);
|
||||
shadowVertexMap.insert(make_pair(shadowVert, index));
|
||||
|
@ -210,7 +210,7 @@ void addShadowMesh(T *meshIn, float paramFaceRatio, sint paramMaxFace, const st
|
|||
{
|
||||
CIndexBuffer pb;
|
||||
// fill
|
||||
pb.setNumIndexes(shadowTriangles.size());
|
||||
pb.setNumIndexes((uint32)shadowTriangles.size());
|
||||
{
|
||||
CIndexBufferReadWrite iba;
|
||||
pb.lock (iba);
|
||||
|
|
|
@ -405,7 +405,7 @@ int main(int argc, char **argv)
|
|||
{
|
||||
nSelected--;
|
||||
if(nSelected == -1)
|
||||
nSelected = DispCS.size()-1;
|
||||
nSelected = (sint32)DispCS.size()-1;
|
||||
}
|
||||
if (CNELU::AsyncListener.isKeyPushed (KeyS))
|
||||
{
|
||||
|
|
|
@ -137,7 +137,7 @@ uint MaxNumLightMap= 0;
|
|||
void displayMeshBase(FILE *logStream, CMeshBase *meshBase)
|
||||
{
|
||||
uint nMat= meshBase->getNbMaterial();
|
||||
uint nLms= meshBase->_LightInfos.size();
|
||||
uint nLms= (uint)meshBase->_LightInfos.size();
|
||||
MaxNumLightMap= max(MaxNumLightMap, nLms);
|
||||
if(nLms)
|
||||
{
|
||||
|
|
|
@ -80,7 +80,7 @@ public:
|
|||
pgId= min(pgId, (uint)(BAR_LENGTH-1));
|
||||
sprintf (msg, "\r%s: %s", message, progressbar[pgId]);
|
||||
uint i;
|
||||
for (i=strlen(msg); i<79; i++)
|
||||
for (i=(uint)strlen(msg); i<79; i++)
|
||||
msg[i]=' ';
|
||||
msg[i]=0;
|
||||
printf (msg);
|
||||
|
|
|
@ -256,7 +256,7 @@ void CIgLighterLib::lightIg(CInstanceLighter &instanceLighter,
|
|||
|
||||
// For any retreiverInstance with this identifier.
|
||||
//----------------
|
||||
uint numInstances= globalRetriever->getInstances().size();
|
||||
uint numInstances= (uint)globalRetriever->getInstances().size();
|
||||
for(uint instanceId=0; instanceId<numInstances; instanceId++)
|
||||
{
|
||||
const CRetrieverInstance &instance= globalRetriever->getInstance(instanceId);
|
||||
|
@ -286,7 +286,7 @@ void CIgLighterLib::lightIg(CInstanceLighter &instanceLighter,
|
|||
CIGSurfaceLightBuild::CRetrieverLightGrid &rlg= itRgm->second;
|
||||
|
||||
// Resize Grids.
|
||||
uint numSurfaces= localRetriever.getSurfaces().size();
|
||||
uint numSurfaces= (uint)localRetriever.getSurfaces().size();
|
||||
rlg.Grids.resize( numSurfaces );
|
||||
|
||||
// Compute the bbox for all surfaces. (NB: local to the localRetriever).
|
||||
|
|
|
@ -96,7 +96,7 @@ void CHLSBankTextureInfo::CDXTCBitmap::build(const NLMISC::CBitmap &src)
|
|||
void CHLSBankTextureInfo::CDXTCBitmap::buildBitmap(NLMISC::CBitmap &dst)
|
||||
{
|
||||
CMemStream memStream(true);
|
||||
memStream.fill(&_Data[0], _Data.size());
|
||||
memStream.fill(&_Data[0], (uint32)_Data.size());
|
||||
// load the DXTC5 from memStream
|
||||
dst.reset();
|
||||
dst.load(memStream);
|
||||
|
|
|
@ -760,7 +760,7 @@ static void BuildColoredVersionForOneBitmap(const CBuildInfo &bi, const std::str
|
|||
std::string outputFileName = fileName;
|
||||
|
||||
// Add an instance entry to the hlsInfo
|
||||
uint instId= hlsInfo.Instances.size();
|
||||
uint instId= (uint)hlsInfo.Instances.size();
|
||||
hlsInfo.Instances.resize(instId+1);
|
||||
CHLSBankTextureInfo::CTextureInstance &hlsTextInstance= hlsInfo.Instances[instId];
|
||||
hlsTextInstance.Mods.resize(masks.size());
|
||||
|
|
|
@ -79,7 +79,7 @@ void progress (const char *message, float progress)
|
|||
pgId= min(pgId, (uint)(BAR_LENGTH-1));
|
||||
sprintf (msg, "\r%s: %s", message, progressbar[pgId]);
|
||||
uint i;
|
||||
for (i=strlen(msg); i<79; i++)
|
||||
for (i=(uint)strlen(msg); i<79; i++)
|
||||
msg[i]=' ';
|
||||
msg[i]=0;
|
||||
printf (msg);
|
||||
|
|
|
@ -173,7 +173,7 @@ string getZoneNameByCoord(float x, float y)
|
|||
string zoneName;
|
||||
char ych[32];
|
||||
sprintf(ych,"%d",(sint)ycount);
|
||||
sint sz = strlen(ych);
|
||||
sint sz = (sint)strlen(ych);
|
||||
for(sint i = 0; i<sz; i++)
|
||||
{
|
||||
zoneName += ych[i];
|
||||
|
@ -376,7 +376,7 @@ void displayZones()
|
|||
if (ViewerCfg.AllPathRelative)
|
||||
Landscape->Landscape.TileBank.makeAllPathRelative();
|
||||
|
||||
sint idx = ViewerCfg.Bank.find(".");
|
||||
sint idx = (sint)ViewerCfg.Bank.find(".");
|
||||
string farBank = ViewerCfg.Bank.substr(0,idx);
|
||||
farBank += ".farbank";
|
||||
|
||||
|
|
|
@ -78,11 +78,11 @@ struct BNPHeader
|
|||
FILE *f = fopen (filename.c_str(), "ab");
|
||||
if (f == NULL) return false;
|
||||
|
||||
uint32 nNbFile = Files.size();
|
||||
uint32 nNbFile = (uint32)Files.size();
|
||||
fwrite (&nNbFile, sizeof(uint32), 1, f);
|
||||
for (uint32 i = 0; i < nNbFile; ++i)
|
||||
{
|
||||
uint8 nStringSize = Files[i].Name.size();
|
||||
uint8 nStringSize = (uint8)Files[i].Name.size();
|
||||
fwrite (&nStringSize, 1, 1, f);
|
||||
fwrite (Files[i].Name.c_str(), 1, nStringSize, f);
|
||||
fwrite (&Files[i].Size, sizeof(uint32), 1, f);
|
||||
|
|
|
@ -112,7 +112,7 @@ sint16 getFirstFreeFileTypeId()
|
|||
{
|
||||
for( sint16 id=0; id<256; ++id )
|
||||
{
|
||||
if( IdToFileType.find(id) == IdToFileType.end() )
|
||||
if( IdToFileType.find((uint8)id) == IdToFileType.end() )
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
@ -609,7 +609,7 @@ int main( int argc, char ** argv )
|
|||
{
|
||||
//string outputLine = "type: " + toString((*it1).first.FormIDInfos.Type) +" id: " + toString((*it1).first.FormIDInfos.Id) + " file: " + (*it1).second +"\n";
|
||||
string outputLine = " id: " + toString((*it1).first.Id) + " file: " + (*it1).second +"\n";
|
||||
output.serialBuffer((uint8*)(const_cast<char*>(outputLine.data())),outputLine.size());
|
||||
output.serialBuffer((uint8*)(const_cast<char*>(outputLine.data())),(uint)outputLine.size());
|
||||
}
|
||||
|
||||
nlinfo ("------------- results ----------------");
|
||||
|
|
|
@ -394,7 +394,7 @@ int main(int argc, char *argv[])
|
|||
CPath::getPathContent(dirName, false, true, false, subDirs);
|
||||
|
||||
// filter the directories
|
||||
for (uint i=subDirs.size(); i>0; --i)
|
||||
for (uint i=(uint)subDirs.size(); i>0; --i)
|
||||
{
|
||||
if (!isExcludedDir(subDirs[i-1]))
|
||||
dirStack.push_back(subDirs[i-1]);
|
||||
|
|
|
@ -182,7 +182,7 @@ void buildExteriorMesh(CCollisionMeshBuild &cmb, CExteriorMesh &em)
|
|||
bool allowThis = true;
|
||||
|
||||
uint numLink = 0;
|
||||
uint firstEdge = edges.size();
|
||||
uint firstEdge = (uint)edges.size();
|
||||
|
||||
vector<CExteriorMesh::CEdge> loop;
|
||||
|
||||
|
@ -224,7 +224,7 @@ void buildExteriorMesh(CCollisionMeshBuild &cmb, CExteriorMesh &em)
|
|||
// this way, collisions won't be checked in the pacs engine
|
||||
if (loop.size() >= 3)
|
||||
{
|
||||
uint n = loop.size();
|
||||
uint n = (uint)loop.size();
|
||||
while (loop.front().Link >= 0 && loop.back().Link >= 0 && n > 0)
|
||||
{
|
||||
loop.push_back(loop.front());
|
||||
|
|
|
@ -629,7 +629,7 @@ void fixFaultyLinks(map<uint, CFaultyInstance> &faultyInstances,
|
|||
CChainRef cr;
|
||||
cr.Chain = chain;
|
||||
cr.Previous = chain;
|
||||
cr.From = fci.Vertices.size();
|
||||
cr.From = (uint)fci.Vertices.size();
|
||||
cr.BorderId = NLPACS::CChain::convertBorderChainId(retriever.getChain(chain).getRight());
|
||||
|
||||
while (!it.end())
|
||||
|
@ -638,7 +638,7 @@ void fixFaultyLinks(map<uint, CFaultyInstance> &faultyInstances,
|
|||
++it;
|
||||
}
|
||||
|
||||
cr.To = fci.Vertices.size()-1;
|
||||
cr.To = (uint)fci.Vertices.size()-1;
|
||||
|
||||
if (l < inst.Reconstructed[j].Chains.size()-1)
|
||||
fci.Vertices.pop_back();
|
||||
|
@ -654,7 +654,7 @@ void fixFaultyLinks(map<uint, CFaultyInstance> &faultyInstances,
|
|||
CChainRef cr;
|
||||
cr.Chain = chain;
|
||||
cr.Previous = chain;
|
||||
cr.From = fcn.Vertices.size();
|
||||
cr.From = (uint)fcn.Vertices.size();
|
||||
cr.BorderId = NLPACS::CChain::convertBorderChainId(nretriever.getChain(chain).getRight());
|
||||
|
||||
while (!it.end())
|
||||
|
@ -663,7 +663,7 @@ void fixFaultyLinks(map<uint, CFaultyInstance> &faultyInstances,
|
|||
++it;
|
||||
}
|
||||
|
||||
cr.To = fcn.Vertices.size()-1;
|
||||
cr.To = (uint)fcn.Vertices.size()-1;
|
||||
|
||||
if (l < neighb.Reconstructed[k].Chains.size()-1)
|
||||
fcn.Vertices.pop_back();
|
||||
|
@ -692,8 +692,8 @@ void fixFaultyLinks(map<uint, CFaultyInstance> &faultyInstances,
|
|||
if (l<fci.Vertices.size())
|
||||
break;
|
||||
|
||||
uint newChaini = retriever.getChains().size(),
|
||||
newChainn = nretriever.getChains().size();
|
||||
uint newChaini = (uint)retriever.getChains().size(),
|
||||
newChainn = (uint)nretriever.getChains().size();
|
||||
|
||||
// save free border ids in order to renumerate them after splits
|
||||
vector<uint> ifreeBorderIds, nfreeBorderIds;
|
||||
|
@ -701,18 +701,18 @@ void fixFaultyLinks(map<uint, CFaultyInstance> &faultyInstances,
|
|||
|
||||
for (l=0; l<fci.Chains.size(); ++l)
|
||||
ifreeBorderIds.push_back(fci.Chains[l].BorderId);
|
||||
inextBorderId = retriever.getBorderChains().size();
|
||||
inextBorderId = (uint)retriever.getBorderChains().size();
|
||||
|
||||
for (l=0; l<fcn.Chains.size(); ++l)
|
||||
nfreeBorderIds.push_back(fcn.Chains[l].BorderId);
|
||||
nnextBorderId = nretriever.getBorderChains().size();
|
||||
nnextBorderId = (uint)nretriever.getBorderChains().size();
|
||||
|
||||
// generate splits from first chain on second chain
|
||||
for (l=0; l<fci.Chains.size()-1; ++l)
|
||||
{
|
||||
uint splitAt = fci.Vertices.size()-1 - fci.Chains[l].To;
|
||||
uint splitAt = (uint)fci.Vertices.size()-1 - fci.Chains[l].To;
|
||||
|
||||
for (m=fcn.Chains.size()-1; (sint)m>=0 && fcn.Chains[m].From>splitAt; --m)
|
||||
for (m=(uint)fcn.Chains.size()-1; (sint)m>=0 && fcn.Chains[m].From>splitAt; --m)
|
||||
;
|
||||
|
||||
// no split ?
|
||||
|
@ -729,9 +729,9 @@ void fixFaultyLinks(map<uint, CFaultyInstance> &faultyInstances,
|
|||
// generate splits from second chain on first chain
|
||||
for (l=0; l<fcn.Chains.size()-1; ++l)
|
||||
{
|
||||
uint splitAt = fcn.Vertices.size()-1 - fcn.Chains[l].To;
|
||||
uint splitAt = (uint)fcn.Vertices.size()-1 - fcn.Chains[l].To;
|
||||
|
||||
for (m=fci.Chains.size()-1; (sint)m>=0 && fci.Chains[m].From>splitAt; --m)
|
||||
for (m=(uint)fci.Chains.size()-1; (sint)m>=0 && fci.Chains[m].From>splitAt; --m)
|
||||
;
|
||||
|
||||
// no split ?
|
||||
|
@ -862,7 +862,7 @@ void fixFaultyLinks(map<uint, CFaultyInstance> &faultyInstances,
|
|||
// force links between instances (border chain links)
|
||||
for (l=0; l<fci.Chains.size(); ++l)
|
||||
{
|
||||
m = fci.Chains.size()-1-l;
|
||||
m = (uint)fci.Chains.size()-1-l;
|
||||
(const_cast<NLPACS::CRetrieverInstance&>(instance)).forceBorderChainLink(fci.Chains[l].BorderId,
|
||||
neighb.Instance,
|
||||
fcn.Chains[m].BorderId,
|
||||
|
|
|
@ -467,7 +467,7 @@ void NLPACS::CComputableSurfaceBorder::smooth(float val)
|
|||
}
|
||||
}
|
||||
|
||||
before = Vertices.size();
|
||||
before = (uint)Vertices.size();
|
||||
while (Vertices.size()>3) // don't smooth blow 3 vertices to avoid degenrated surfaces
|
||||
{
|
||||
minArea = val;
|
||||
|
@ -496,7 +496,7 @@ void NLPACS::CComputableSurfaceBorder::smooth(float val)
|
|||
break;
|
||||
}
|
||||
}
|
||||
after = Vertices.size();
|
||||
after = (uint)Vertices.size();
|
||||
|
||||
if (Verbose)
|
||||
nlinfo("smoothed border %d-%d: %d -> %d", Left, Right, before, after);
|
||||
|
@ -622,7 +622,7 @@ void NLPACS::CComputableSurface::buildBorders(CZoneTessellation *zoneTessel)
|
|||
if ((Elements[elem]->EdgeLinks[edge] == NULL || Elements[elem]->EdgeLinks[edge]->SurfaceId != SurfaceId) &&
|
||||
!Elements[elem]->EdgeFlag[edge])
|
||||
{
|
||||
BorderIds.push_back(BorderKeeper->size());
|
||||
BorderIds.push_back((uint16)BorderKeeper->size());
|
||||
|
||||
BorderKeeper->resize(BorderKeeper->size()+1);
|
||||
CComputableSurfaceBorder &border = BorderKeeper->back();
|
||||
|
@ -1225,7 +1225,7 @@ void NLPACS::CZoneTessellation::build()
|
|||
// if doesn't exist, create a new vertex
|
||||
if ((vremapit = vremap.find(v[i])) == vremap.end())
|
||||
{
|
||||
element.Tri[i] = _Vertices.size();
|
||||
element.Tri[i] = (uint32)_Vertices.size();
|
||||
_Vertices.push_back(*(v[i]));
|
||||
vremap.insert(make_pair(v[i], element.Tri[i]));
|
||||
}
|
||||
|
@ -1633,13 +1633,13 @@ void NLPACS::CZoneTessellation::generateBorders(float smooth)
|
|||
}
|
||||
|
||||
float smScale = (Borders[border].Right < 0) ? 0.2f : 1.0f;
|
||||
uint before = Borders[border].Vertices.size();
|
||||
uint before = (uint)Borders[border].Vertices.size();
|
||||
if (SmoothBorders && !Borders[border].DontSmooth)
|
||||
{
|
||||
Borders[border].smooth(smooth*smScale);
|
||||
}
|
||||
Borders[border].computeLength();
|
||||
uint after = Borders[border].Vertices.size();
|
||||
uint after = (uint)Borders[border].Vertices.size();
|
||||
totalBefore += before;
|
||||
totalAfter += after;
|
||||
|
||||
|
@ -1678,7 +1678,7 @@ void NLPACS::CZoneTessellation::saveTessellation(COFile &output)
|
|||
for (i=0; i<_Tessellation.size(); ++i)
|
||||
_Tessellation[i].ElemId = i;
|
||||
|
||||
uint32 numTessel = _Tessellation.size();
|
||||
uint32 numTessel = (uint32)_Tessellation.size();
|
||||
output.serial(numTessel);
|
||||
|
||||
for (i=0; i<_Tessellation.size(); ++i)
|
||||
|
|
|
@ -49,8 +49,8 @@ void CSurfaceSplitter::build(CLocalRetriever &lr)
|
|||
buildSurface(lr, i);
|
||||
|
||||
nlinfo("converted %d chains & %d surfaces", lr.getChains().size(), lr.getSurfaces().size());
|
||||
_NumSurfaces = lr.getSurfaces().size();
|
||||
_NumChains = lr.getChains().size();
|
||||
_NumSurfaces = (uint)lr.getSurfaces().size();
|
||||
_NumChains = (uint)lr.getChains().size();
|
||||
|
||||
//splitChains();
|
||||
|
||||
|
@ -502,7 +502,7 @@ void CSurfaceSplitter::replaceChain(CChainId chainId, const vector<CChainId> &ch
|
|||
{
|
||||
it = ploop.Chains.erase(it);
|
||||
sint i;
|
||||
for (i=chains.size()-1; i>=0; --i)
|
||||
for (i=(sint)chains.size()-1; i>=0; --i)
|
||||
{
|
||||
it = ploop.Chains.insert(it, chains[i]);
|
||||
}
|
||||
|
|
|
@ -367,7 +367,7 @@ public:
|
|||
Direction = forward ? +1 : -1;
|
||||
if (splitter == NULL || pLoop == NULL)
|
||||
return;
|
||||
Chain = (Direction>0 ? 0 : pLoop->Chains.size()-1);
|
||||
Chain = (Direction>0 ? 0 : (sint)pLoop->Chains.size()-1);
|
||||
resetChain();
|
||||
}
|
||||
iterator(const iterator &it)
|
||||
|
@ -420,7 +420,7 @@ public:
|
|||
}
|
||||
pChain = pSplitter->getChain(pLoop->Chains[Chain]);
|
||||
ChainDirection = (pChain->Left == pLoop->Surface ? Direction : -Direction);
|
||||
ChainVertex = (ChainDirection>0 ? 0 : pChain->Vertices.size()-1);
|
||||
ChainVertex = (ChainDirection>0 ? 0 : (sint)pChain->Vertices.size()-1);
|
||||
}
|
||||
|
||||
CVector2s64 operator * () const
|
||||
|
|
|
@ -37,7 +37,7 @@ enum TLogLineHeader { LHDate, LHTime, LHType, LHThread, LHService, LHCodeFile, L
|
|||
///
|
||||
bool isLogFile( const std::string& filename )
|
||||
{
|
||||
uint len = filename.size();
|
||||
uint len = (uint)filename.size();
|
||||
return (len >= 4 ) && (filename.substr( len-4 ) == ".log");
|
||||
}
|
||||
|
||||
|
@ -180,7 +180,7 @@ const uint CurrentVersion = ~0;
|
|||
// Return true and logVersion, or false if not a log with version
|
||||
bool getLogVersion( const std::string& filename, uint& logVersion )
|
||||
{
|
||||
uint len = filename.size();
|
||||
uint len = (uint)filename.size();
|
||||
if ( (len > 4) && (filename.substr( len-4 ) == ".log") )
|
||||
{
|
||||
if ( filename.substr(0, 3) == "log" )
|
||||
|
@ -242,7 +242,7 @@ void CMakeLogTask::run()
|
|||
{
|
||||
// Parse log target
|
||||
uint targetVersion = CurrentVersion;
|
||||
uint lts = _LogTarget.size();
|
||||
uint lts = (uint)_LogTarget.size();
|
||||
if ( _LogTarget.empty() || (_LogTarget == "v") )
|
||||
{
|
||||
targetMode = TTMMatchExactV;
|
||||
|
@ -314,7 +314,7 @@ void CMakeLogTask::run()
|
|||
CIFile logfile;
|
||||
if ( logfile.open( *ilf, true ) )
|
||||
{
|
||||
_OutputLogReport->setProgress( ilf-filenames.begin(), filenames.size() );
|
||||
_OutputLogReport->setProgress( (uint)(ilf-filenames.begin()), (uint)filenames.size() );
|
||||
while ( ! logfile.eof() )
|
||||
{
|
||||
logfile.getline( line, MAX_LOG_LINE_SIZE );
|
||||
|
|
|
@ -149,7 +149,7 @@ public:
|
|||
|
||||
std::string service() { return _Service; }
|
||||
|
||||
virtual uint getNbDistinctLines() const { return _LogLineInfo.size(); }
|
||||
virtual uint getNbDistinctLines() const { return (uint)_LogLineInfo.size(); }
|
||||
|
||||
virtual uint getNbTotalLines( NLMISC::CLog::TLogType logType );
|
||||
|
||||
|
|
Loading…
Reference in a new issue