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