Changed: #825 Remove all warning when compiling Ryzom on Linux

This commit is contained in:
kervala 2010-05-13 21:58:50 +02:00
parent 1104704333
commit e417730df3
54 changed files with 98 additions and 98 deletions

View file

@ -103,7 +103,7 @@ public:
*/ */
uint getNumAnimation () const uint getNumAnimation () const
{ {
return _Animation.size(); return (uint)_Animation.size();
} }
/** /**
@ -138,7 +138,7 @@ public:
*/ */
uint getNumSkeletonWeight () const uint getNumSkeletonWeight () const
{ {
return _SkeletonWeight.size(); return (uint)_SkeletonWeight.size();
} }
/** /**

View file

@ -111,7 +111,7 @@ public:
void link (CPortal* portal); void link (CPortal* portal);
void unlink (CPortal* portal); void unlink (CPortal* portal);
uint32 getNbPortals() {return _Portals.size();} uint32 getNbPortals() {return (uint32)_Portals.size();}
CPortal* getPortal(uint32 pos) {return _Portals[pos];} CPortal* getPortal(uint32 pos) {return _Portals[pos];}
/// Serial /// Serial

View file

@ -98,7 +98,7 @@ public:
uint size() const uint size() const
{ {
return _indexedColors.size(); return (uint)_indexedColors.size();
} }
uint getIndex(uint i) const uint getIndex(uint i) const

View file

@ -84,7 +84,7 @@ public:
/// Get the head on the array of elements. NULL if none /// Get the head on the array of elements. NULL if none
void **begin() { if(_Elements.empty()) return NULL; else return &_Elements[0];} void **begin() { if(_Elements.empty()) return NULL; else return &_Elements[0];}
/// get the number of elements /// get the number of elements
uint size() const {return _Elements.size();} uint size() const {return (uint)_Elements.size();}
bool empty() const {return _Elements.empty();} bool empty() const {return _Elements.empty();}
/// clear the list /// clear the list

View file

@ -78,7 +78,7 @@ public:
void addMask(const NLMISC::CBitmap &bmp, uint threshold= 15); void addMask(const NLMISC::CBitmap &bmp, uint threshold= 15);
/// get num of masks /// get num of masks
uint getNumMasks() const {return _Masks.size();} uint getNumMasks() const {return (uint)_Masks.size();}
/** build a texture with a HLS Color Delta /** build a texture with a HLS Color Delta
* \param colDelta array of delta to apply to the bitmap (must be of numMasks entries) * \param colDelta array of delta to apply to the bitmap (must be of numMasks entries)

View file

@ -58,7 +58,7 @@ public:
bool buildTexture(sint textId, NLMISC::CBitmap &out) const; bool buildTexture(sint textId, NLMISC::CBitmap &out) const;
/// Texture name access /// Texture name access
uint getNumTextures() const {return _Instances.size();} uint getNumTextures() const {return (uint)_Instances.size();}
const char *getTextureName(uint i) const; const char *getTextureName(uint i) const;
private: private:

View file

@ -178,7 +178,7 @@ public:
uint getNumTriangles() const {return _NumTriangles;} uint getNumTriangles() const {return _NumTriangles;}
/// get the number of bones /// get the number of bones
uint getNumBones() const {return _Bones.size();} uint getNumBones() const {return (uint)_Bones.size();}
/// get a bone id, according to its name. -1 if not found /// get a bone id, according to its name. -1 if not found
sint getBoneIdByName(const std::string &name) const; sint getBoneIdByName(const std::string &name) const;

View file

@ -392,12 +392,12 @@ public:
const CVertexBuffer &getVertexBuffer() const { return _VBuffer ; } const CVertexBuffer &getVertexBuffer() const { return _VBuffer ; }
/// get the number of matrix block /// get the number of matrix block
uint getNbMatrixBlock() const { return _MatrixBlocks.size() ; } uint getNbMatrixBlock() const { return (uint)_MatrixBlocks.size() ; }
/** get the number of rendering pass for a given matrix block /** get the number of rendering pass for a given matrix block
* \param matrixBlockIndex the index of the matrix block the rendering passes belong to * \param matrixBlockIndex the index of the matrix block the rendering passes belong to
*/ */
uint getNbRdrPass(uint matrixBlockIndex) const { return _MatrixBlocks[matrixBlockIndex].RdrPass.size() ; } uint getNbRdrPass(uint matrixBlockIndex) const { return (uint)_MatrixBlocks[matrixBlockIndex].RdrPass.size() ; }
/** get the primitive block associated with a rendering pass of a matrix block /** get the primitive block associated with a rendering pass of a matrix block
* \param matrixBlockIndex the index of the matrix block the renderin pass belong to * \param matrixBlockIndex the index of the matrix block the renderin pass belong to
@ -418,7 +418,7 @@ public:
} }
/// get the number of BlendShapes /// get the number of BlendShapes
uint getNbBlendShapes() const { if(_MeshMorpher) return _MeshMorpher->BlendShapes.size(); return 0; } uint getNbBlendShapes() const { if(_MeshMorpher) return (uint)_MeshMorpher->BlendShapes.size(); return 0; }
/** Tool function to retrieve vector geometry only of the mesh. /** Tool function to retrieve vector geometry only of the mesh.
* return false if the vbuffer cannot be read (resident) * return false if the vbuffer cannot be read (resident)

View file

@ -185,7 +185,7 @@ public:
/// Get the number of materials in the mesh /// Get the number of materials in the mesh
uint getNbMaterial() const uint getNbMaterial() const
{ {
return _Materials.size(); return (uint)_Materials.size();
} }
/// Get a material /// Get a material

View file

@ -175,13 +175,13 @@ public:
/** get the number of LOD. /** get the number of LOD.
*/ */
uint getNbLod() const { return _Lods.size() ; } uint getNbLod() const { return (uint)_Lods.size() ; }
/** get the number of rendering pass of a LOD. /** get the number of rendering pass of a LOD.
* \param lodId the id of the LOD. * \param lodId the id of the LOD.
*/ */
uint getNbRdrPass(uint lodId) const { return _Lods[lodId].RdrPass.size() ; } uint getNbRdrPass(uint lodId) const { return (uint)_Lods[lodId].RdrPass.size() ; }
/** get the primitive block associated with a rendering pass of a LOD. /** get the primitive block associated with a rendering pass of a LOD.
@ -211,7 +211,7 @@ public:
} }
/// get the number of BlendShapes /// get the number of BlendShapes
uint getNbBlendShapes() const { return _MeshMorpher.BlendShapes.size(); } uint getNbBlendShapes() const { return (uint)_MeshMorpher.BlendShapes.size(); }
/** Build a geometry copy for the given Lod. The VBuffer/IndexBuffer must not be resident. false if bad lodId /** Build a geometry copy for the given Lod. The VBuffer/IndexBuffer must not be resident. false if bad lodId
* The process ensure there is no hole in the resulting vertices array. Hence VB num Verts != vertices.size(). * The process ensure there is no hole in the resulting vertices array. Hence VB num Verts != vertices.size().

View file

@ -152,13 +152,13 @@ public:
/** get the number of LOD. /** get the number of LOD.
*/ */
uint getNbLod() const { return _Lods.size() ; } uint getNbLod() const { return (uint)_Lods.size() ; }
/** get the number of rendering pass of a LOD. /** get the number of rendering pass of a LOD.
* \param lodId the id of the LOD. * \param lodId the id of the LOD.
*/ */
uint getNbRdrPass(uint lodId) const { return _Lods[lodId].RdrPass.size() ; } uint getNbRdrPass(uint lodId) const { return (uint)_Lods[lodId].RdrPass.size() ; }
/** get the primitive block associated with a rendering pass of a LOD. /** get the primitive block associated with a rendering pass of a LOD.
@ -294,7 +294,7 @@ private:
// Get num triangle // Get num triangle
uint getNumTriangle () const uint getNumTriangle () const
{ {
return PBlock.size()/3; return (uint)PBlock.size()/3;
} }
}; };
@ -476,7 +476,7 @@ public:
// Acces it // Acces it
uint getNumVertices() const uint getNumVertices() const
{ {
return _PackedBuffer.size(); return (uint)_PackedBuffer.size();
} }
// Decompact position // Decompact position

View file

@ -142,7 +142,7 @@ public:
/// Get slot mesh count. /// Get slot mesh count.
uint getNumSlotMesh () const uint getNumSlotMesh () const
{ {
return _MeshVector.size(); return (uint)_MeshVector.size();
} }
/// Get a slot mesh. /// Get a slot mesh.

View file

@ -263,7 +263,7 @@ public:
void remove(CParticleSystemProcess *process); void remove(CParticleSystemProcess *process);
/// get the number of process that are attached to the system /// get the number of process that are attached to the system
uint32 getNbProcess(void) const { return _ProcessVect.size(); } uint32 getNbProcess(void) const { return (uint32)_ProcessVect.size(); }
/** /**
* Get a pointer to the nth process. * Get a pointer to the nth process.

View file

@ -131,7 +131,7 @@ public:
bool isShared() const { return _Sharing; } bool isShared() const { return _Sharing; }
// Get the number of cached textures // Get the number of cached textures
uint getNumCachedTextures() const { return _CachedTex.size(); } uint getNumCachedTextures() const { return (uint)_CachedTex.size(); }
// Get a cached texture // Get a cached texture
ITexture *getCachedTexture(uint index) const { return _CachedTex[index]; } ITexture *getCachedTexture(uint index) const { return _CachedTex[index]; }

View file

@ -294,7 +294,7 @@ public:
void resize(uint32 nbInstances); void resize(uint32 nbInstances);
/// return the number of instance in the container /// return the number of instance in the container
uint32 getSize(void) const { return _Tab.size(); } uint32 getSize(void) const { return (uint32)_Tab.size(); }
/// return the max number of instance in the container /// return the max number of instance in the container
uint32 getMaxSize(void) const { return _MaxSize; } uint32 getMaxSize(void) const { return _MaxSize; }
@ -411,7 +411,7 @@ sint32 CPSAttrib<T>::insert(const T &t)
return -1; return -1;
} }
_Tab.push_back(t); _Tab.push_back(t);
return _Tab.size() - 1; return (sint32)_Tab.size() - 1;
} }
@ -455,7 +455,7 @@ void CPSAttrib<T>::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
} }
else else
{ {
uint32 size = _Tab.size(); uint32 size = (uint32)_Tab.size();
f.serial(size); f.serial(size);
f.serial(_MaxSize); f.serial(_MaxSize);
f.serial(size); f.serial(size);
@ -537,7 +537,7 @@ void CPSAttrib<T>::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
} }
else else
{ {
uint32 size = _Tab.size(), capacity = _Tab.capacity(); uint32 size = (uint32)_Tab.size(), capacity = (uint32)_Tab.capacity();
if (ver == 3) if (ver == 3)
{ {
f.serial(size, capacity); f.serial(size, capacity);

View file

@ -466,7 +466,7 @@ void CPSValueGradientFunc<T>::setValues(const T *valueTab, uint32 numValues, uin
computeGradient(valueTab, numValues, nbStages, _Tab, _MinValue, _MaxValue); computeGradient(valueTab, numValues, nbStages, _Tab, _MinValue, _MaxValue);
// //
_NbStages = nbStages; _NbStages = nbStages;
_NbValues = _Tab.size() - 1; _NbValues = (uint32)_Tab.size() - 1;
} }

View file

@ -104,7 +104,7 @@ public:
{ {
min = _MinAngularVelocity; min = _MinAngularVelocity;
max = _MaxAngularVelocity; max = _MaxAngularVelocity;
return _PrecompBasis.size(); return (uint32)_PrecompBasis.size();
} }
/// from CPSParticle : return true if there are lightable faces in the object /// from CPSParticle : return true if there are lightable faces in the object

View file

@ -121,7 +121,7 @@ class CPSFloatCurveFunctor
void addControlPoint(const CCtrlPoint &ctrlPoint); void addControlPoint(const CCtrlPoint &ctrlPoint);
/// retrieve the number of control points /// retrieve the number of control points
uint getNumCtrlPoints(void) const { return _CtrlPoints.size(); } uint getNumCtrlPoints(void) const { return (uint)_CtrlPoints.size(); }
/** get a control point. /** get a control point.
* \return a <date, value> std::pair * \return a <date, value> std::pair

View file

@ -151,7 +151,7 @@ public:
/** /**
* count the number of bound objects * count the number of bound objects
*/ */
uint32 getNbBoundObjects(void) const { NL_PS_FUNC(getNbBoundObjects); return _LocatedBoundCont.size(); } uint32 getNbBoundObjects(void) const { NL_PS_FUNC(getNbBoundObjects); return (uint32)_LocatedBoundCont.size(); }
/** /**
* get a pointer to a bound object (const version) * get a pointer to a bound object (const version)
@ -989,7 +989,7 @@ public:
*/ */
virtual void releaseAllRef(); virtual void releaseAllRef();
/// return the number of targets /// return the number of targets
uint32 getNbTargets(void) const { return _Targets.size(); } uint32 getNbTargets(void) const { return (uint32)_Targets.size(); }
/// Return a ptr on a target. Invalid range -> nlassert /// Return a ptr on a target. Invalid range -> nlassert
CPSLocated *getTarget(uint32 index) CPSLocated *getTarget(uint32 index)
{ {

View file

@ -266,7 +266,7 @@ public:
{ {
min = _MinAngularVelocity; min = _MinAngularVelocity;
max = _MaxAngularVelocity; max = _MaxAngularVelocity;
return _PrecompBasis.size(); return (uint32)_PrecompBasis.size();
} }

View file

@ -132,7 +132,7 @@ public:
// See if shape is in brace mode (rather then in closed loop mode) // See if shape is in brace mode (rather then in closed loop mode)
bool getBraceMode() const { return _BraceMode; } bool getBraceMode() const { return _BraceMode; }
/// get the number of vertice in the shape used for ribbons /// get the number of vertice in the shape used for ribbons
uint32 getNbVerticesInShape(void) const { return _Shape.size(); } uint32 getNbVerticesInShape(void) const { return (uint32)_Shape.size(); }
/** Get a copy of the shape used for ribbon /** Get a copy of the shape used for ribbon
* \param dest a table of cvector that has the right size, it will be filled with vertices * \param dest a table of cvector that has the right size, it will be filled with vertices

View file

@ -802,7 +802,7 @@ template<class T> void CQuadGrid<T>::buildSelectionShape(TSelectionShape &dest,
{ {
dest.clear(); dest.clear();
sint minY; sint minY;
uint numVerts = poly.Vertices.size(); uint numVerts = (uint)poly.Vertices.size();
_ScaledPoly.Vertices.resize(numVerts); _ScaledPoly.Vertices.resize(numVerts);
nlassert(_EltSize != 0.f); nlassert(_EltSize != 0.f);
float invScale = 1.f / _EltSize; float invScale = 1.f / _EltSize;
@ -814,7 +814,7 @@ template<class T> void CQuadGrid<T>::buildSelectionShape(TSelectionShape &dest,
_ScaledPoly.computeOuterBorders(_PolyBorders, minY); _ScaledPoly.computeOuterBorders(_PolyBorders, minY);
if (_PolyBorders.empty()) return; if (_PolyBorders.empty()) return;
initSelectStamps(); initSelectStamps();
sint numSegs = _PolyBorders.size(); sint numSegs = (sint)_PolyBorders.size();
for (sint y = 0; y < numSegs; ++y) for (sint y = 0; y < numSegs; ++y)
{ {
sint currIndex = ((minY + y) & (_Size - 1)) << _SizePower; sint currIndex = ((minY + y) & (_Size - 1)) << _SizePower;

View file

@ -419,7 +419,7 @@ public:
/// get the number of light group. /// get the number of light group.
uint getNumLightGroup () const uint getNumLightGroup () const
{ {
return _LightGroupColor.size (); return (uint)_LightGroupColor.size ();
} }
/// get the color of a lightmap group. /// get the color of a lightmap group.
NLMISC::CRGBA getLightmapGroupColor(uint lightGroup) const NLMISC::CRGBA getLightmapGroupColor(uint lightGroup) const

View file

@ -341,7 +341,7 @@ public:
const std::vector<CPointLightNamed> &getPointLightList() const {return _PointLightArray.getPointLights();} const std::vector<CPointLightNamed> &getPointLightList() const {return _PointLightArray.getPointLights();}
/// Get the number of point lights /// Get the number of point lights
uint getNumPointLights() const { return _PointLightArray.getPointLights().size(); } uint getNumPointLights() const { return (uint)_PointLightArray.getPointLights().size(); }
/// Get a mutable ref on a point light named /// Get a mutable ref on a point light named
CPointLightNamed &getPointLightNamed(uint index) CPointLightNamed &getPointLightNamed(uint index)

View file

@ -97,7 +97,7 @@ public:
*/ */
void setNumCorners(uint numCorners); void setNumCorners(uint numCorners);
// get the number of corners // get the number of corners
uint32 getNumCorners() const { return _Corners.size(); } uint32 getNumCorners() const { return (uint32)_Corners.size(); }
// Set a corner // Set a corner
void setCorner(uint corner, const NLMISC::CVector &value); void setCorner(uint corner, const NLMISC::CVector &value);
// Get a corner // Get a corner

View file

@ -199,7 +199,7 @@ public:
bool forceComputeBone(uint boneId); bool forceComputeBone(uint boneId);
/// return the number of bones currently animated/computed (because of bindSkin()/stickObject() / Lod system). /// return the number of bones currently animated/computed (because of bindSkin()/stickObject() / Lod system).
uint getNumBoneComputed() const {return _BoneToCompute.size();} uint getNumBoneComputed() const {return (uint)_BoneToCompute.size();}
/** change the Lod Bone interpolation distance (in meters). If 0, interpolation is disabled. /** change the Lod Bone interpolation distance (in meters). If 0, interpolation is disabled.
* The smaller this value is, the more Lod skeleton system will "pop". Default is 0.5 meters. * The smaller this value is, the more Lod skeleton system will "pop". Default is 0.5 meters.

View file

@ -108,7 +108,7 @@ public:
/// get lod information. /// get lod information.
const CLod &getLod(uint lod) const {return _Lods[lod];} const CLod &getLod(uint lod) const {return _Lods[lod];}
uint getNumLods() const {return _Lods.size();} uint getNumLods() const {return (uint)_Lods.size();}
// *************************** // ***************************
private: private:

View file

@ -51,7 +51,7 @@ public:
*/ */
void setFileName(uint index, const char *); void setFileName(uint index, const char *);
// //
uint getNumFileName() const { return _FileNames.size(); } uint getNumFileName() const { return (uint)_FileNames.size(); }
/** /**
* get the name of the file containing the texture for the given index * get the name of the file containing the texture for the given index
* \return name of the file * \return name of the file

View file

@ -331,7 +331,7 @@ public:
} }
sint getNumTile256 () const sint getNumTile256 () const
{ {
return _Tile256.size(); return (sint)_Tile256.size();
} }
sint32 getTile128 (sint index) const sint32 getTile128 (sint index) const
{ {
@ -494,40 +494,40 @@ public:
// Get // Get
sint getLandCount () const sint getLandCount () const
{ {
return _LandVector.size(); return (sint)_LandVector.size();
}; }
const CTileLand* getLand (int landIndex) const const CTileLand* getLand (int landIndex) const
{ {
return &_LandVector[landIndex]; return &_LandVector[landIndex];
}; }
CTileLand* getLand (int landIndex) CTileLand* getLand (int landIndex)
{ {
return &_LandVector[landIndex]; return &_LandVector[landIndex];
}; }
sint getTileSetCount () const sint getTileSetCount () const
{ {
return _TileSetVector.size(); return (sint)_TileSetVector.size();
}; }
const CTileSet* getTileSet (int tileIndex) const const CTileSet* getTileSet (int tileIndex) const
{ {
return &_TileSetVector[tileIndex]; return &_TileSetVector[tileIndex];
}; }
CTileSet* getTileSet (int tileIndex) CTileSet* getTileSet (int tileIndex)
{ {
return &_TileSetVector[tileIndex]; return &_TileSetVector[tileIndex];
}; }
sint getTileCount () const sint getTileCount () const
{ {
return _TileVector.size(); return (sint)_TileVector.size();
}; }
const CTile* getTile (int tileIndex) const const CTile* getTile (int tileIndex) const
{ {
return &_TileVector[tileIndex]; return &_TileVector[tileIndex];
}; }
CTile* getTile (int tileIndex) CTile* getTile (int tileIndex)
{ {
return &_TileVector[tileIndex]; return &_TileVector[tileIndex];
}; }
sint addLand (const std::string& name); sint addLand (const std::string& name);
void removeLand (sint landIndex); void removeLand (sint landIndex);
sint addTileSet (const std::string& name); sint addTileSet (const std::string& name);

View file

@ -79,7 +79,7 @@ public:
/// Return the pixel array size. Should be 0 for empty, 64 for a 128x128 tile and 256 for a 256x256 tile. /// Return the pixel array size. Should be 0 for empty, 64 for a 128x128 tile and 256 for a 256x256 tile.
uint getSize (TFarType type, TFarOrder order) const uint getSize (TFarType type, TFarOrder order) const
{ {
return _Pixels[type][order].size(); return (uint)_Pixels[type][order].size();
} }
/// Set the pixel array of a far Tile /// Set the pixel array of a far Tile

View file

@ -155,7 +155,7 @@ protected:
ITrackKeyFramer<CKeyBezierQuat>::compile(); ITrackKeyFramer<CKeyBezierQuat>::compile();
// makeclosest quaternions, Tangents Precompute. // makeclosest quaternions, Tangents Precompute.
sint nKeys= _MapKey.size(); sint nKeys= (sint)_MapKey.size();
if(nKeys<=1) if(nKeys<=1)
return; return;

View file

@ -246,7 +246,7 @@ protected:
// Tangents Precompute. // Tangents Precompute.
sint nKeys= this->_MapKey.size(); sint nKeys= (sint)this->_MapKey.size();
if(nKeys<=1) if(nKeys<=1)
return; return;
@ -458,7 +458,7 @@ public:
} }
// Tangents Precompute. // Tangents Precompute.
sint nKeys= _MapKey.size(); sint nKeys= (sint)_MapKey.size();
if(nKeys<=1) if(nKeys<=1)
return; return;

View file

@ -236,7 +236,7 @@ public:
// unlink from all parent clip // unlink from all parent clip
void clipUnlinkFromAll(); void clipUnlinkFromAll();
// get Parents links. NB: indices are no more valid after a clipDelChild() // get Parents links. NB: indices are no more valid after a clipDelChild()
uint clipGetNumParents() const {return _ClipParents.size();} uint clipGetNumParents() const {return (uint)_ClipParents.size();}
CTransform *clipGetParent(uint index) const; CTransform *clipGetParent(uint index) const;
// get Sons links. NB: indices are no more valid after a clipDelChild() // get Sons links. NB: indices are no more valid after a clipDelChild()
uint clipGetNumChildren() const {return _ClipSons.size();} uint clipGetNumChildren() const {return _ClipSons.size();}

View file

@ -490,7 +490,7 @@ public:
float getPatchScale() const {return PatchScale;} float getPatchScale() const {return PatchScale;}
bool compiled() const {return Compiled;} bool compiled() const {return Compiled;}
uint16 getZoneId() const {return ZoneId;} uint16 getZoneId() const {return ZoneId;}
sint getNumPatchs() const {return Patchs.size();} sint getNumPatchs() const {return (sint)Patchs.size();}
// Return the Bounding Box of the zone. // Return the Bounding Box of the zone.
const CAABBoxExt &getZoneBB() const {return ZoneBB;} const CAABBoxExt &getZoneBB() const {return ZoneBB;}

View file

@ -331,7 +331,7 @@ public:
void addWaterShape(CWaterShape *shape, const NLMISC::CMatrix &MT); void addWaterShape(CWaterShape *shape, const NLMISC::CMatrix &MT);
/// get the number of water shapes added /// get the number of water shapes added
uint getNumWaterShape() const {return _WaterShapes.size();} uint getNumWaterShape() const {return (uint)_WaterShapes.size();}
/// check whether a shape is lightable. /// check whether a shape is lightable.
static bool isLightableShape(IShape &shape); static bool isLightableShape(IShape &shape);

View file

@ -363,8 +363,8 @@ void loadForm (const std::vector<std::string> &sheetFilters, const std::string &
{ {
uint dicIndex; uint dicIndex;
// add a new dictionnary entry // add a new dictionnary entry
dicIndex = dictionnary.size(); dicIndex = (uint)dictionnary.size();
dictionnaryIndex.insert(std::make_pair(filename, dictionnary.size())); dictionnaryIndex.insert(std::make_pair(filename, (uint)dictionnary.size()));
dictionnary.push_back(filename); dictionnary.push_back(filename);
// add the dependecy index // add the dependecy index
@ -430,7 +430,7 @@ void loadForm (const std::vector<std::string> &sheetFilters, const std::string &
ofile.serialCont(dictionnary); ofile.serialCont(dictionnary);
// write the dependencies data // write the dependencies data
uint32 depSize = dependencies.size(); uint32 depSize = (uint32)dependencies.size();
ofile.serial(depSize); ofile.serial(depSize);
std::map<NLMISC::CSheetId, std::vector<uint32> >::iterator first(dependencies.begin()), last(dependencies.end()); std::map<NLMISC::CSheetId, std::vector<uint32> >::iterator first(dependencies.begin()), last(dependencies.end());
for (; first != last; ++first) for (; first != last; ++first)
@ -448,7 +448,7 @@ void loadForm (const std::vector<std::string> &sheetFilters, const std::string &
ofile.seek(endBlockSize, NLMISC::IStream::begin); ofile.seek(endBlockSize, NLMISC::IStream::begin);
// write the sheet data // write the sheet data
uint32 nbEntries = sheetIds.size(); uint32 nbEntries = (uint32)sheetIds.size();
uint32 ver = T::getVersion (); uint32 ver = T::getVersion ();
ofile.serial (nbEntries); ofile.serial (nbEntries);
ofile.serial (ver); ofile.serial (ver);
@ -1086,8 +1086,8 @@ void loadForm (const std::vector<std::string> &sheetFilters, const std::string &
if (dictionnaryIndex.find(filename) == dictionnaryIndex.end()) if (dictionnaryIndex.find(filename) == dictionnaryIndex.end())
{ {
// add a new dictionnary entry // add a new dictionnary entry
dicIndex = dictionnary.size(); dicIndex = (uint)dictionnary.size();
dictionnaryIndex.insert(std::make_pair(filename, dictionnary.size())); dictionnaryIndex.insert(std::make_pair(filename, (uint)dictionnary.size()));
dictionnary.push_back(filename); dictionnary.push_back(filename);
} }
else else
@ -1157,7 +1157,7 @@ void loadForm (const std::vector<std::string> &sheetFilters, const std::string &
ofile.serialCont(dictionnary); ofile.serialCont(dictionnary);
// write the dependencies data // write the dependencies data
uint32 depSize = dependencies.size(); uint32 depSize = (uint32)dependencies.size();
ofile.serial(depSize); ofile.serial(depSize);
std::map<std::string, std::vector<uint32> >::iterator first(dependencies.begin()), last(dependencies.end()); std::map<std::string, std::vector<uint32> >::iterator first(dependencies.begin()), last(dependencies.end());
for (; first != last; ++first) for (; first != last; ++first)
@ -1175,7 +1175,7 @@ void loadForm (const std::vector<std::string> &sheetFilters, const std::string &
ofile.seek(endBlockSize, NLMISC::IStream::begin); ofile.seek(endBlockSize, NLMISC::IStream::begin);
// write the sheet data // write the sheet data
uint32 nbEntries = sheetNames.size(); uint32 nbEntries = (uint32)sheetNames.size();
uint32 ver = T::getVersion (); uint32 ver = T::getVersion ();
ofile.serial (nbEntries); ofile.serial (nbEntries);
ofile.serial (ver); ofile.serial (ver);

View file

@ -211,7 +211,7 @@ public:
/** Get the children primitive count */ /** Get the children primitive count */
uint getNumChildren () const uint getNumChildren () const
{ {
return _Children.size (); return (uint)_Children.size ();
} }
/** Get a child primitive */ /** Get a child primitive */

View file

@ -127,7 +127,7 @@ uint searchLowerBound(const T *array, uint arraySize, const T &key)
template<class T> template<class T>
uint searchLowerBound(const std::vector<T> &array, const T &key) uint searchLowerBound(const std::vector<T> &array, const T &key)
{ {
uint size= array.size(); uint size= (uint)array.size();
if(size==0) if(size==0)
return 0; return 0;
else else

View file

@ -71,7 +71,7 @@ public:
{ {
_BlockSize= other._BlockSize; _BlockSize= other._BlockSize;
// if other block is rebinded, don't copy its rebinded size. // if other block is rebinded, don't copy its rebinded size.
_EltSize= std::max(sizeof(T), sizeof(void*)); _EltSize= (uint)std::max(sizeof(T), sizeof(void*));
// No elts allocated // No elts allocated
_NextFreeElt= NULL; _NextFreeElt= NULL;
_NAllocatedElts= 0; _NAllocatedElts= 0;

View file

@ -68,7 +68,7 @@ public:
~CBufFIFO (); ~CBufFIFO ();
/// Push 'buffer' in the head of the FIFO /// Push 'buffer' in the head of the FIFO
void push (const std::vector<uint8> &buffer) { push (&buffer[0], buffer.size()); } void push (const std::vector<uint8> &buffer) { push (&buffer[0], (uint32)buffer.size()); }
void push (const NLMISC::CMemStream &buffer) { push (buffer.buffer(), buffer.length()); } void push (const NLMISC::CMemStream &buffer) { push (buffer.buffer(), buffer.length()); }

View file

@ -145,7 +145,7 @@ namespace STRING_MANAGER
uint size() const uint size() const
{ {
return Data.size(); return (uint)Data.size();
} }
void insertColumn(uint colIndex) void insertColumn(uint colIndex)
@ -230,7 +230,7 @@ namespace STRING_MANAGER
// Return the first column for which the title does not begin with '*' // Return the first column for which the title does not begin with '*'
if ( columnTitle[0] != '*' ) if ( columnTitle[0] != '*' )
{ {
colIndex = (it - Data[0].begin()); colIndex = (uint)(it - Data[0].begin());
return true; return true;
} }
} }
@ -246,7 +246,7 @@ namespace STRING_MANAGER
if (it == Data[0].end()) if (it == Data[0].end())
return false; return false;
colIndex = it - Data[0].begin(); colIndex = (uint)(it - Data[0].begin());
return true; return true;
} }
@ -261,7 +261,7 @@ namespace STRING_MANAGER
// resize the rows // resize the rows
void resize(uint numRows) void resize(uint numRows)
{ {
uint oldSize= Data.size(); uint oldSize= (uint)Data.size();
Data.resize(numRows); Data.resize(numRows);
// alloc good Column count for new lines // alloc good Column count for new lines
for(uint i= oldSize;i<Data.size();i++) for(uint i= oldSize;i<Data.size();i++)
@ -278,7 +278,7 @@ namespace STRING_MANAGER
{ {
if (first->operator[](colIndex) == colValue) if (first->operator[](colIndex) == colValue)
{ {
rowIndex = first - Data.begin(); rowIndex = (uint)(first - Data.begin());
return true; return true;
} }
@ -497,7 +497,7 @@ namespace STRING_MANAGER
else else
{ {
// nlassert(it != context.Reference.begin()+refCount); // nlassert(it != context.Reference.begin()+refCount);
uint index = find_if(context.Reference.begin(), context.Reference.end(), TestItem(getIdentifier(context.Addition, addCount))) - context.Reference.begin(); uint index = (uint)(find_if(context.Reference.begin(), context.Reference.end(), TestItem(getIdentifier(context.Addition, addCount))) - context.Reference.begin());
// callback->onSwap(it - context.Reference.begin(), refCount, context); // callback->onSwap(it - context.Reference.begin(), refCount, context);
callback->onSwap(index, refCount, context); callback->onSwap(index, refCount, context);

View file

@ -41,7 +41,7 @@ public:
/// test whether e is in the emitter list /// test whether e is in the emitter list
bool isEmitter(IEventEmitter *e) const; bool isEmitter(IEventEmitter *e) const;
// Get the number of registered emitters // Get the number of registered emitters
uint getNumEmitters() const { return _Emitters.size(); } uint getNumEmitters() const { return (uint)_Emitters.size(); }
// Get an emitter // Get an emitter
IEventEmitter *getEmitter(uint index); IEventEmitter *getEmitter(uint index);
const IEventEmitter *getEmitter(uint index) const; const IEventEmitter *getEmitter(uint index) const;

View file

@ -46,7 +46,7 @@ public:
// Set number of entries in the historic. Oldest entries are removed // Set number of entries in the historic. Oldest entries are removed
inline void setMaxSize(uint maxSize); inline void setMaxSize(uint maxSize);
// Get current size of historic // Get current size of historic
uint getSize() const { return _Historic.size(); } uint getSize() const { return (uint)_Historic.size(); }
// Access to an element in history, 0 being the oldest, size - 1 being the lastest added element // Access to an element in history, 0 being the oldest, size - 1 being the lastest added element
const T &operator[](uint index) const { return _Historic[index]; /* let STL do out of range check */ } const T &operator[](uint index) const { return _Historic[index]; /* let STL do out of range check */ }
// Clear historic // Clear historic

View file

@ -43,7 +43,7 @@ public:
/// remove a device from this server (but does not delete it). /// remove a device from this server (but does not delete it).
void removeDevice(IInputDevice *device); void removeDevice(IInputDevice *device);
// returns the number of registered devices // returns the number of registered devices
uint getNumDevices() const { return _Devices.size(); } uint getNumDevices() const { return (uint)_Devices.size(); }
// return a device // return a device
IInputDevice *getDevice(uint index) { return _Devices[index]; } IInputDevice *getDevice(uint index) { return _Devices[index]; }
/// Test whether the given device is handled by this server. /// Test whether the given device is handled by this server.

View file

@ -53,7 +53,7 @@ public:
time_t Date; time_t Date;
TLogType LogType; TLogType LogType;
std::string ProcessName; std::string ProcessName;
uint ThreadId; size_t ThreadId;
const char *FileName; const char *FileName;
sint Line; sint Line;
const char *FuncName; const char *FuncName;

View file

@ -570,7 +570,7 @@ protected:
#define writenumber(src,format,digits) \ #define writenumber(src,format,digits) \
char number_as_cstring [digits+1]; \ char number_as_cstring [digits+1]; \
sprintf( number_as_cstring, format, src ); \ sprintf( number_as_cstring, format, src ); \
serialSeparatedBufferOut( (uint8*)number_as_cstring, strlen(number_as_cstring) ); serialSeparatedBufferOut( (uint8*)number_as_cstring, (uint)strlen(number_as_cstring) );
/* /*
* atoihex * atoihex

View file

@ -52,7 +52,7 @@ public:
/// Constructor. Init with a triangle. /// Constructor. Init with a triangle.
CPolygon(const CVector &a, const CVector &b, const CVector &c); CPolygon(const CVector &a, const CVector &b, const CVector &c);
sint getNumVertices() const {return Vertices.size();} sint getNumVertices() const {return (sint)Vertices.size();}
// build a triangle fan from this polygon, appending resulting tris to 'dest' // build a triangle fan from this polygon, appending resulting tris to 'dest'
void toTriFan(std::vector<NLMISC::CTriangle> &dest) const; void toTriFan(std::vector<NLMISC::CTriangle> &dest) const;

View file

@ -1057,7 +1057,7 @@ private:
} }
else else
{ {
len= cont.size(); len= (sint32)cont.size();
serial(len); serial(len);
} }
@ -1116,7 +1116,7 @@ protected:
} }
else else
{ {
len= cont.size(); len = (sint32)cont.size();
serial(len); serial(len);
// Close the node header // Close the node header
@ -1238,7 +1238,7 @@ private:
} }
else else
{ {
len= cont.size(); len= (sint32)cont.size();
serial(len); serial(len);
} }
@ -1393,7 +1393,7 @@ private:
} }
else else
{ {
len= cont.size(); len= (sint32)cont.size();
serial(len); serial(len);
} }
@ -1587,7 +1587,7 @@ private:
} }
else else
{ {
len= cont.size(); len= (sint32)cont.size();
serial(len); serial(len);
__iterator it= cont.begin(); __iterator it= cont.begin();

View file

@ -97,7 +97,7 @@ public:
const std::string &toString(const TDestType &value) const; const std::string &toString(const TDestType &value) const;
// nb of pairs in the map // nb of pairs in the map
inline uint16 getNbPairs() const { return _String2DestType.size(); } inline uint16 getNbPairs() const { return (uint16)_String2DestType.size(); }
// Check a value against the list a value, return true if the value exist in the container // Check a value against the list a value, return true if the value exist in the container
bool isValid(const DestType &value) const; bool isValid(const DestType &value) const;

View file

@ -71,7 +71,7 @@ public:
nlassert (!str.empty()); nlassert (!str.empty());
// add at the end // add at the end
addString (str, _StringArray.size ()); addString (str, (TStringId)_StringArray.size ());
} }
/** Returns the id associated to string str. If the id is not found, the string will be added in /** Returns the id associated to string str. If the id is not found, the string will be added in
@ -138,7 +138,7 @@ public:
/// Returns the size of the _StringArray /// Returns the size of the _StringArray
TStringId size () const TStringId size () const
{ {
return _StringArray.size (); return (TStringId)_StringArray.size ();
} }
/// Returns all string in the _NeedToAskStringArray /// Returns all string in the _NeedToAskStringArray

View file

@ -87,7 +87,7 @@ public:
_CurFrame++; _CurFrame++;
// _CurFrame%=_LastFrames.size(); // _CurFrame%=_LastFrames.size();
if (_CurFrame >= _LastFrames.size()) if (_CurFrame >= _LastFrames.size())
_CurFrame -= _LastFrames.size(); _CurFrame -= (uint)_LastFrames.size();
// update the number of frames added. // update the number of frames added.
_NumFrame++; _NumFrame++;

View file

@ -420,7 +420,7 @@ public:
uint nb; uint nb;
{ {
NLMISC::CSynchronized<CConnections>::CAccessor connectionssync( &_Connections ); NLMISC::CSynchronized<CConnections>::CAccessor connectionssync( &_Connections );
nb = connectionssync.value().size(); nb = (uint)connectionssync.value().size();
} }
return nb; return nb;
} }

View file

@ -237,9 +237,9 @@ public:
/// Return the names of the sounds (call this method after loadSounds()) /// Return the names of the sounds (call this method after loadSounds())
virtual void getSoundNames( std::vector<NLMISC::TStringId> &names ) const; virtual void getSoundNames( std::vector<NLMISC::TStringId> &names ) const;
/// Return the number of mixing tracks (voices) /// Return the number of mixing tracks (voices)
virtual uint getPolyphony() const { return _Tracks.size(); } virtual uint getPolyphony() const { return (uint)_Tracks.size(); }
/// Return the number of sources instance. /// Return the number of sources instance.
virtual uint getSourcesInstanceCount() const { return _Sources.size(); } virtual uint getSourcesInstanceCount() const { return (uint)_Sources.size(); }
/// Return the number of playing sources (slow) /// Return the number of playing sources (slow)
virtual uint getPlayingSourcesCount() const; virtual uint getPlayingSourcesCount() const;
/// Return the number of available tracks /// Return the number of available tracks

View file

@ -54,7 +54,7 @@ public:
/** Return the number of markers in this track /** Return the number of markers in this track
*/ */
virtual uint32 countMarkers() { return _Markers.size(); } virtual uint32 countMarkers() { return (uint32)_Markers.size(); }
/** Return a marker of this track given its index */ /** Return a marker of this track given its index */
virtual CSoundAnimMarker* getMarker(uint32 i) { return _Markers[i]; } virtual CSoundAnimMarker* getMarker(uint32 i) { return _Markers[i]; }