From 53a99b5b55617fc3600c16b791e992f353714b69 Mon Sep 17 00:00:00 2001 From: kervala Date: Thu, 13 May 2010 21:58:50 +0200 Subject: [PATCH] Changed: #825 Remove all warning when compiling Ryzom on Linux --- code/nel/include/nel/3d/animation_set.h | 4 +-- code/nel/include/nel/3d/cluster.h | 2 +- code/nel/include/nel/3d/computed_string.h | 2 +- code/nel/include/nel/3d/fast_ptr_list.h | 2 +- code/nel/include/nel/3d/hls_color_texture.h | 2 +- code/nel/include/nel/3d/hls_texture_manager.h | 2 +- code/nel/include/nel/3d/lod_character_shape.h | 2 +- code/nel/include/nel/3d/mesh.h | 6 ++--- code/nel/include/nel/3d/mesh_base.h | 2 +- code/nel/include/nel/3d/mesh_mrm.h | 6 ++--- code/nel/include/nel/3d/mesh_mrm_skinned.h | 8 +++--- code/nel/include/nel/3d/mesh_multi_lod.h | 2 +- code/nel/include/nel/3d/particle_system.h | 2 +- .../include/nel/3d/particle_system_shape.h | 2 +- code/nel/include/nel/3d/ps_attrib.h | 8 +++--- .../include/nel/3d/ps_attrib_maker_template.h | 2 +- code/nel/include/nel/3d/ps_face.h | 2 +- code/nel/include/nel/3d/ps_float.h | 2 +- code/nel/include/nel/3d/ps_located.h | 4 +-- code/nel/include/nel/3d/ps_mesh.h | 2 +- code/nel/include/nel/3d/ps_ribbon.h | 2 +- code/nel/include/nel/3d/quad_grid.h | 4 +-- code/nel/include/nel/3d/scene.h | 2 +- code/nel/include/nel/3d/scene_group.h | 2 +- code/nel/include/nel/3d/seg_remanence_shape.h | 2 +- code/nel/include/nel/3d/skeleton_model.h | 2 +- code/nel/include/nel/3d/skeleton_shape.h | 2 +- code/nel/include/nel/3d/texture_multi_file.h | 2 +- code/nel/include/nel/3d/tile_bank.h | 26 +++++++++---------- code/nel/include/nel/3d/tile_far_bank.h | 2 +- code/nel/include/nel/3d/track_bezier.h | 2 +- code/nel/include/nel/3d/track_tcb.h | 4 +-- code/nel/include/nel/3d/transform.h | 2 +- code/nel/include/nel/3d/zone.h | 2 +- code/nel/include/nel/3d/zone_lighter.h | 2 +- code/nel/include/nel/georges/load_form.h | 16 ++++++------ code/nel/include/nel/ligo/primitive.h | 2 +- code/nel/include/nel/misc/algo.h | 2 +- code/nel/include/nel/misc/block_memory.h | 2 +- code/nel/include/nel/misc/buf_fifo.h | 2 +- code/nel/include/nel/misc/diff_tool.h | 12 ++++----- .../include/nel/misc/event_emitter_multi.h | 2 +- code/nel/include/nel/misc/historic.h | 2 +- .../include/nel/misc/input_device_server.h | 2 +- code/nel/include/nel/misc/log.h | 2 +- code/nel/include/nel/misc/mem_stream.h | 2 +- code/nel/include/nel/misc/polygon.h | 2 +- code/nel/include/nel/misc/stream.h | 10 +++---- code/nel/include/nel/misc/string_conversion.h | 2 +- code/nel/include/nel/misc/string_id_array.h | 4 +-- code/nel/include/nel/misc/value_smoother.h | 2 +- code/nel/include/nel/net/buf_server.h | 2 +- code/nel/include/nel/sound/audio_mixer_user.h | 4 +-- code/nel/include/nel/sound/sound_animation.h | 2 +- 54 files changed, 98 insertions(+), 98 deletions(-) diff --git a/code/nel/include/nel/3d/animation_set.h b/code/nel/include/nel/3d/animation_set.h index 72f389e7b..e9013d3d3 100644 --- a/code/nel/include/nel/3d/animation_set.h +++ b/code/nel/include/nel/3d/animation_set.h @@ -103,7 +103,7 @@ public: */ uint getNumAnimation () const { - return _Animation.size(); + return (uint)_Animation.size(); } /** @@ -138,7 +138,7 @@ public: */ uint getNumSkeletonWeight () const { - return _SkeletonWeight.size(); + return (uint)_SkeletonWeight.size(); } /** diff --git a/code/nel/include/nel/3d/cluster.h b/code/nel/include/nel/3d/cluster.h index f12a669ce..07ccc7d7e 100644 --- a/code/nel/include/nel/3d/cluster.h +++ b/code/nel/include/nel/3d/cluster.h @@ -111,7 +111,7 @@ public: void link (CPortal* portal); void unlink (CPortal* portal); - uint32 getNbPortals() {return _Portals.size();} + uint32 getNbPortals() {return (uint32)_Portals.size();} CPortal* getPortal(uint32 pos) {return _Portals[pos];} /// Serial diff --git a/code/nel/include/nel/3d/computed_string.h b/code/nel/include/nel/3d/computed_string.h index 7b026bc6d..0ce2092f9 100644 --- a/code/nel/include/nel/3d/computed_string.h +++ b/code/nel/include/nel/3d/computed_string.h @@ -98,7 +98,7 @@ public: uint size() const { - return _indexedColors.size(); + return (uint)_indexedColors.size(); } uint getIndex(uint i) const diff --git a/code/nel/include/nel/3d/fast_ptr_list.h b/code/nel/include/nel/3d/fast_ptr_list.h index 5beff4266..d9e279d75 100644 --- a/code/nel/include/nel/3d/fast_ptr_list.h +++ b/code/nel/include/nel/3d/fast_ptr_list.h @@ -84,7 +84,7 @@ public: /// Get the head on the array of elements. NULL if none void **begin() { if(_Elements.empty()) return NULL; else return &_Elements[0];} /// get the number of elements - uint size() const {return _Elements.size();} + uint size() const {return (uint)_Elements.size();} bool empty() const {return _Elements.empty();} /// clear the list diff --git a/code/nel/include/nel/3d/hls_color_texture.h b/code/nel/include/nel/3d/hls_color_texture.h index da27da70d..11cbeacbc 100644 --- a/code/nel/include/nel/3d/hls_color_texture.h +++ b/code/nel/include/nel/3d/hls_color_texture.h @@ -78,7 +78,7 @@ public: void addMask(const NLMISC::CBitmap &bmp, uint threshold= 15); /// 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 * \param colDelta array of delta to apply to the bitmap (must be of numMasks entries) diff --git a/code/nel/include/nel/3d/hls_texture_manager.h b/code/nel/include/nel/3d/hls_texture_manager.h index f007b0f05..d39d55354 100644 --- a/code/nel/include/nel/3d/hls_texture_manager.h +++ b/code/nel/include/nel/3d/hls_texture_manager.h @@ -58,7 +58,7 @@ public: bool buildTexture(sint textId, NLMISC::CBitmap &out) const; /// Texture name access - uint getNumTextures() const {return _Instances.size();} + uint getNumTextures() const {return (uint)_Instances.size();} const char *getTextureName(uint i) const; private: diff --git a/code/nel/include/nel/3d/lod_character_shape.h b/code/nel/include/nel/3d/lod_character_shape.h index b8aa8a9b2..c1cdb424b 100644 --- a/code/nel/include/nel/3d/lod_character_shape.h +++ b/code/nel/include/nel/3d/lod_character_shape.h @@ -178,7 +178,7 @@ public: uint getNumTriangles() const {return _NumTriangles;} /// 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 sint getBoneIdByName(const std::string &name) const; diff --git a/code/nel/include/nel/3d/mesh.h b/code/nel/include/nel/3d/mesh.h index f4c6f6987..d5a462918 100644 --- a/code/nel/include/nel/3d/mesh.h +++ b/code/nel/include/nel/3d/mesh.h @@ -392,12 +392,12 @@ public: const CVertexBuffer &getVertexBuffer() const { return _VBuffer ; } /// 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 * \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 * \param matrixBlockIndex the index of the matrix block the renderin pass belong to @@ -418,7 +418,7 @@ public: } /// 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. * return false if the vbuffer cannot be read (resident) diff --git a/code/nel/include/nel/3d/mesh_base.h b/code/nel/include/nel/3d/mesh_base.h index b576a02e7..0925d21d6 100644 --- a/code/nel/include/nel/3d/mesh_base.h +++ b/code/nel/include/nel/3d/mesh_base.h @@ -185,7 +185,7 @@ public: /// Get the number of materials in the mesh uint getNbMaterial() const { - return _Materials.size(); + return (uint)_Materials.size(); } /// Get a material diff --git a/code/nel/include/nel/3d/mesh_mrm.h b/code/nel/include/nel/3d/mesh_mrm.h index 9e1608a3d..24c64cb81 100644 --- a/code/nel/include/nel/3d/mesh_mrm.h +++ b/code/nel/include/nel/3d/mesh_mrm.h @@ -175,13 +175,13 @@ public: /** 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. * \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. @@ -211,7 +211,7 @@ public: } /// 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 * The process ensure there is no hole in the resulting vertices array. Hence VB num Verts != vertices.size(). diff --git a/code/nel/include/nel/3d/mesh_mrm_skinned.h b/code/nel/include/nel/3d/mesh_mrm_skinned.h index 1470a1c38..6df2699e4 100644 --- a/code/nel/include/nel/3d/mesh_mrm_skinned.h +++ b/code/nel/include/nel/3d/mesh_mrm_skinned.h @@ -152,13 +152,13 @@ public: /** 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. * \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. @@ -294,7 +294,7 @@ private: // Get num triangle uint getNumTriangle () const { - return PBlock.size()/3; + return (uint)PBlock.size()/3; } }; @@ -476,7 +476,7 @@ public: // Acces it uint getNumVertices() const { - return _PackedBuffer.size(); + return (uint)_PackedBuffer.size(); } // Decompact position diff --git a/code/nel/include/nel/3d/mesh_multi_lod.h b/code/nel/include/nel/3d/mesh_multi_lod.h index 3a6235125..5e891b7b2 100644 --- a/code/nel/include/nel/3d/mesh_multi_lod.h +++ b/code/nel/include/nel/3d/mesh_multi_lod.h @@ -142,7 +142,7 @@ public: /// Get slot mesh count. uint getNumSlotMesh () const { - return _MeshVector.size(); + return (uint)_MeshVector.size(); } /// Get a slot mesh. diff --git a/code/nel/include/nel/3d/particle_system.h b/code/nel/include/nel/3d/particle_system.h index 9bc61e1db..e22bd20b9 100644 --- a/code/nel/include/nel/3d/particle_system.h +++ b/code/nel/include/nel/3d/particle_system.h @@ -263,7 +263,7 @@ public: void remove(CParticleSystemProcess *process); /// 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. diff --git a/code/nel/include/nel/3d/particle_system_shape.h b/code/nel/include/nel/3d/particle_system_shape.h index 2dcae74e9..6f5f84e42 100644 --- a/code/nel/include/nel/3d/particle_system_shape.h +++ b/code/nel/include/nel/3d/particle_system_shape.h @@ -131,7 +131,7 @@ public: bool isShared() const { return _Sharing; } // Get the number of cached textures - uint getNumCachedTextures() const { return _CachedTex.size(); } + uint getNumCachedTextures() const { return (uint)_CachedTex.size(); } // Get a cached texture ITexture *getCachedTexture(uint index) const { return _CachedTex[index]; } diff --git a/code/nel/include/nel/3d/ps_attrib.h b/code/nel/include/nel/3d/ps_attrib.h index a745fb676..fc17dc787 100644 --- a/code/nel/include/nel/3d/ps_attrib.h +++ b/code/nel/include/nel/3d/ps_attrib.h @@ -294,7 +294,7 @@ public: void resize(uint32 nbInstances); /// 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 uint32 getMaxSize(void) const { return _MaxSize; } @@ -411,7 +411,7 @@ sint32 CPSAttrib::insert(const T &t) return -1; } _Tab.push_back(t); - return _Tab.size() - 1; + return (sint32)_Tab.size() - 1; } @@ -455,7 +455,7 @@ void CPSAttrib::serial(NLMISC::IStream &f) throw(NLMISC::EStream) } else { - uint32 size = _Tab.size(); + uint32 size = (uint32)_Tab.size(); f.serial(size); f.serial(_MaxSize); f.serial(size); @@ -537,7 +537,7 @@ void CPSAttrib::serial(NLMISC::IStream &f) throw(NLMISC::EStream) } else { - uint32 size = _Tab.size(), capacity = _Tab.capacity(); + uint32 size = (uint32)_Tab.size(), capacity = (uint32)_Tab.capacity(); if (ver == 3) { f.serial(size, capacity); diff --git a/code/nel/include/nel/3d/ps_attrib_maker_template.h b/code/nel/include/nel/3d/ps_attrib_maker_template.h index f29fd5790..8e84c5abd 100644 --- a/code/nel/include/nel/3d/ps_attrib_maker_template.h +++ b/code/nel/include/nel/3d/ps_attrib_maker_template.h @@ -466,7 +466,7 @@ void CPSValueGradientFunc::setValues(const T *valueTab, uint32 numValues, uin computeGradient(valueTab, numValues, nbStages, _Tab, _MinValue, _MaxValue); // _NbStages = nbStages; - _NbValues = _Tab.size() - 1; + _NbValues = (uint32)_Tab.size() - 1; } diff --git a/code/nel/include/nel/3d/ps_face.h b/code/nel/include/nel/3d/ps_face.h index c06bc4a08..1d6239064 100644 --- a/code/nel/include/nel/3d/ps_face.h +++ b/code/nel/include/nel/3d/ps_face.h @@ -104,7 +104,7 @@ public: { min = _MinAngularVelocity; max = _MaxAngularVelocity; - return _PrecompBasis.size(); + return (uint32)_PrecompBasis.size(); } /// from CPSParticle : return true if there are lightable faces in the object diff --git a/code/nel/include/nel/3d/ps_float.h b/code/nel/include/nel/3d/ps_float.h index ddb5c2659..20878de27 100644 --- a/code/nel/include/nel/3d/ps_float.h +++ b/code/nel/include/nel/3d/ps_float.h @@ -121,7 +121,7 @@ class CPSFloatCurveFunctor void addControlPoint(const CCtrlPoint &ctrlPoint); /// 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. * \return a std::pair diff --git a/code/nel/include/nel/3d/ps_located.h b/code/nel/include/nel/3d/ps_located.h index 92bea18de..cc6106897 100644 --- a/code/nel/include/nel/3d/ps_located.h +++ b/code/nel/include/nel/3d/ps_located.h @@ -151,7 +151,7 @@ public: /** * 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) @@ -989,7 +989,7 @@ public: */ virtual void releaseAllRef(); /// 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 CPSLocated *getTarget(uint32 index) { diff --git a/code/nel/include/nel/3d/ps_mesh.h b/code/nel/include/nel/3d/ps_mesh.h index d93e82cab..c4e54929e 100644 --- a/code/nel/include/nel/3d/ps_mesh.h +++ b/code/nel/include/nel/3d/ps_mesh.h @@ -266,7 +266,7 @@ public: { min = _MinAngularVelocity; max = _MaxAngularVelocity; - return _PrecompBasis.size(); + return (uint32)_PrecompBasis.size(); } diff --git a/code/nel/include/nel/3d/ps_ribbon.h b/code/nel/include/nel/3d/ps_ribbon.h index 2b08d9e58..2ec490b22 100644 --- a/code/nel/include/nel/3d/ps_ribbon.h +++ b/code/nel/include/nel/3d/ps_ribbon.h @@ -132,7 +132,7 @@ public: // See if shape is in brace mode (rather then in closed loop mode) bool getBraceMode() const { return _BraceMode; } /// 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 * \param dest a table of cvector that has the right size, it will be filled with vertices diff --git a/code/nel/include/nel/3d/quad_grid.h b/code/nel/include/nel/3d/quad_grid.h index 9e7a63467..28ec3ed64 100644 --- a/code/nel/include/nel/3d/quad_grid.h +++ b/code/nel/include/nel/3d/quad_grid.h @@ -802,7 +802,7 @@ template void CQuadGrid::buildSelectionShape(TSelectionShape &dest, { dest.clear(); sint minY; - uint numVerts = poly.Vertices.size(); + uint numVerts = (uint)poly.Vertices.size(); _ScaledPoly.Vertices.resize(numVerts); nlassert(_EltSize != 0.f); float invScale = 1.f / _EltSize; @@ -814,7 +814,7 @@ template void CQuadGrid::buildSelectionShape(TSelectionShape &dest, _ScaledPoly.computeOuterBorders(_PolyBorders, minY); if (_PolyBorders.empty()) return; initSelectStamps(); - sint numSegs = _PolyBorders.size(); + sint numSegs = (sint)_PolyBorders.size(); for (sint y = 0; y < numSegs; ++y) { sint currIndex = ((minY + y) & (_Size - 1)) << _SizePower; diff --git a/code/nel/include/nel/3d/scene.h b/code/nel/include/nel/3d/scene.h index f3c68ddc4..b003314af 100644 --- a/code/nel/include/nel/3d/scene.h +++ b/code/nel/include/nel/3d/scene.h @@ -419,7 +419,7 @@ public: /// get the number of light group. uint getNumLightGroup () const { - return _LightGroupColor.size (); + return (uint)_LightGroupColor.size (); } /// get the color of a lightmap group. NLMISC::CRGBA getLightmapGroupColor(uint lightGroup) const diff --git a/code/nel/include/nel/3d/scene_group.h b/code/nel/include/nel/3d/scene_group.h index b4828ff6b..9b4f8d792 100644 --- a/code/nel/include/nel/3d/scene_group.h +++ b/code/nel/include/nel/3d/scene_group.h @@ -341,7 +341,7 @@ public: const std::vector &getPointLightList() const {return _PointLightArray.getPointLights();} /// 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 CPointLightNamed &getPointLightNamed(uint index) diff --git a/code/nel/include/nel/3d/seg_remanence_shape.h b/code/nel/include/nel/3d/seg_remanence_shape.h index 395032bdf..510c7ac2a 100644 --- a/code/nel/include/nel/3d/seg_remanence_shape.h +++ b/code/nel/include/nel/3d/seg_remanence_shape.h @@ -97,7 +97,7 @@ public: */ void setNumCorners(uint numCorners); // get the number of corners - uint32 getNumCorners() const { return _Corners.size(); } + uint32 getNumCorners() const { return (uint32)_Corners.size(); } // Set a corner void setCorner(uint corner, const NLMISC::CVector &value); // Get a corner diff --git a/code/nel/include/nel/3d/skeleton_model.h b/code/nel/include/nel/3d/skeleton_model.h index 9bf16b192..b2f13d256 100644 --- a/code/nel/include/nel/3d/skeleton_model.h +++ b/code/nel/include/nel/3d/skeleton_model.h @@ -199,7 +199,7 @@ public: bool forceComputeBone(uint boneId); /// 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. * The smaller this value is, the more Lod skeleton system will "pop". Default is 0.5 meters. diff --git a/code/nel/include/nel/3d/skeleton_shape.h b/code/nel/include/nel/3d/skeleton_shape.h index 9997a7357..5a2d36dbe 100644 --- a/code/nel/include/nel/3d/skeleton_shape.h +++ b/code/nel/include/nel/3d/skeleton_shape.h @@ -108,7 +108,7 @@ public: /// get lod information. const CLod &getLod(uint lod) const {return _Lods[lod];} - uint getNumLods() const {return _Lods.size();} + uint getNumLods() const {return (uint)_Lods.size();} // *************************** private: diff --git a/code/nel/include/nel/3d/texture_multi_file.h b/code/nel/include/nel/3d/texture_multi_file.h index 579d9cf63..bcd3dba28 100644 --- a/code/nel/include/nel/3d/texture_multi_file.h +++ b/code/nel/include/nel/3d/texture_multi_file.h @@ -51,7 +51,7 @@ public: */ 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 * \return name of the file diff --git a/code/nel/include/nel/3d/tile_bank.h b/code/nel/include/nel/3d/tile_bank.h index 30ad4d9a5..ca7e2f22d 100644 --- a/code/nel/include/nel/3d/tile_bank.h +++ b/code/nel/include/nel/3d/tile_bank.h @@ -331,7 +331,7 @@ public: } sint getNumTile256 () const { - return _Tile256.size(); + return (sint)_Tile256.size(); } sint32 getTile128 (sint index) const { @@ -494,40 +494,40 @@ public: // Get sint getLandCount () const { - return _LandVector.size(); - }; + return (sint)_LandVector.size(); + } const CTileLand* getLand (int landIndex) const { return &_LandVector[landIndex]; - }; + } CTileLand* getLand (int landIndex) { return &_LandVector[landIndex]; - }; + } sint getTileSetCount () const { - return _TileSetVector.size(); - }; + return (sint)_TileSetVector.size(); + } const CTileSet* getTileSet (int tileIndex) const { return &_TileSetVector[tileIndex]; - }; + } CTileSet* getTileSet (int tileIndex) { return &_TileSetVector[tileIndex]; - }; + } sint getTileCount () const { - return _TileVector.size(); - }; + return (sint)_TileVector.size(); + } const CTile* getTile (int tileIndex) const { return &_TileVector[tileIndex]; - }; + } CTile* getTile (int tileIndex) { return &_TileVector[tileIndex]; - }; + } sint addLand (const std::string& name); void removeLand (sint landIndex); sint addTileSet (const std::string& name); diff --git a/code/nel/include/nel/3d/tile_far_bank.h b/code/nel/include/nel/3d/tile_far_bank.h index e1d6261f0..76070dcde 100644 --- a/code/nel/include/nel/3d/tile_far_bank.h +++ b/code/nel/include/nel/3d/tile_far_bank.h @@ -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. 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 diff --git a/code/nel/include/nel/3d/track_bezier.h b/code/nel/include/nel/3d/track_bezier.h index d907592d1..9835e3b30 100644 --- a/code/nel/include/nel/3d/track_bezier.h +++ b/code/nel/include/nel/3d/track_bezier.h @@ -155,7 +155,7 @@ protected: ITrackKeyFramer::compile(); // makeclosest quaternions, Tangents Precompute. - sint nKeys= _MapKey.size(); + sint nKeys= (sint)_MapKey.size(); if(nKeys<=1) return; diff --git a/code/nel/include/nel/3d/track_tcb.h b/code/nel/include/nel/3d/track_tcb.h index 032ae3a76..8daf5cc2a 100644 --- a/code/nel/include/nel/3d/track_tcb.h +++ b/code/nel/include/nel/3d/track_tcb.h @@ -246,7 +246,7 @@ protected: // Tangents Precompute. - sint nKeys= this->_MapKey.size(); + sint nKeys= (sint)this->_MapKey.size(); if(nKeys<=1) return; @@ -458,7 +458,7 @@ public: } // Tangents Precompute. - sint nKeys= _MapKey.size(); + sint nKeys= (sint)_MapKey.size(); if(nKeys<=1) return; diff --git a/code/nel/include/nel/3d/transform.h b/code/nel/include/nel/3d/transform.h index 288b0b059..fd551f93d 100644 --- a/code/nel/include/nel/3d/transform.h +++ b/code/nel/include/nel/3d/transform.h @@ -236,7 +236,7 @@ public: // unlink from all parent clip void clipUnlinkFromAll(); // 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; // get Sons links. NB: indices are no more valid after a clipDelChild() uint clipGetNumChildren() const {return _ClipSons.size();} diff --git a/code/nel/include/nel/3d/zone.h b/code/nel/include/nel/3d/zone.h index 4b1dc93b6..29c87104c 100644 --- a/code/nel/include/nel/3d/zone.h +++ b/code/nel/include/nel/3d/zone.h @@ -490,7 +490,7 @@ public: float getPatchScale() const {return PatchScale;} bool compiled() const {return Compiled;} 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. const CAABBoxExt &getZoneBB() const {return ZoneBB;} diff --git a/code/nel/include/nel/3d/zone_lighter.h b/code/nel/include/nel/3d/zone_lighter.h index 632e1d8f5..f096fe130 100644 --- a/code/nel/include/nel/3d/zone_lighter.h +++ b/code/nel/include/nel/3d/zone_lighter.h @@ -331,7 +331,7 @@ public: void addWaterShape(CWaterShape *shape, const NLMISC::CMatrix &MT); /// 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. static bool isLightableShape(IShape &shape); diff --git a/code/nel/include/nel/georges/load_form.h b/code/nel/include/nel/georges/load_form.h index c3ba283c8..b0767cade 100644 --- a/code/nel/include/nel/georges/load_form.h +++ b/code/nel/include/nel/georges/load_form.h @@ -363,8 +363,8 @@ void loadForm (const std::vector &sheetFilters, const std::string & { uint dicIndex; // add a new dictionnary entry - dicIndex = dictionnary.size(); - dictionnaryIndex.insert(std::make_pair(filename, dictionnary.size())); + dicIndex = (uint)dictionnary.size(); + dictionnaryIndex.insert(std::make_pair(filename, (uint)dictionnary.size())); dictionnary.push_back(filename); // add the dependecy index @@ -430,7 +430,7 @@ void loadForm (const std::vector &sheetFilters, const std::string & ofile.serialCont(dictionnary); // write the dependencies data - uint32 depSize = dependencies.size(); + uint32 depSize = (uint32)dependencies.size(); ofile.serial(depSize); std::map >::iterator first(dependencies.begin()), last(dependencies.end()); for (; first != last; ++first) @@ -448,7 +448,7 @@ void loadForm (const std::vector &sheetFilters, const std::string & ofile.seek(endBlockSize, NLMISC::IStream::begin); // write the sheet data - uint32 nbEntries = sheetIds.size(); + uint32 nbEntries = (uint32)sheetIds.size(); uint32 ver = T::getVersion (); ofile.serial (nbEntries); ofile.serial (ver); @@ -1086,8 +1086,8 @@ void loadForm (const std::vector &sheetFilters, const std::string & if (dictionnaryIndex.find(filename) == dictionnaryIndex.end()) { // add a new dictionnary entry - dicIndex = dictionnary.size(); - dictionnaryIndex.insert(std::make_pair(filename, dictionnary.size())); + dicIndex = (uint)dictionnary.size(); + dictionnaryIndex.insert(std::make_pair(filename, (uint)dictionnary.size())); dictionnary.push_back(filename); } else @@ -1157,7 +1157,7 @@ void loadForm (const std::vector &sheetFilters, const std::string & ofile.serialCont(dictionnary); // write the dependencies data - uint32 depSize = dependencies.size(); + uint32 depSize = (uint32)dependencies.size(); ofile.serial(depSize); std::map >::iterator first(dependencies.begin()), last(dependencies.end()); for (; first != last; ++first) @@ -1175,7 +1175,7 @@ void loadForm (const std::vector &sheetFilters, const std::string & ofile.seek(endBlockSize, NLMISC::IStream::begin); // write the sheet data - uint32 nbEntries = sheetNames.size(); + uint32 nbEntries = (uint32)sheetNames.size(); uint32 ver = T::getVersion (); ofile.serial (nbEntries); ofile.serial (ver); diff --git a/code/nel/include/nel/ligo/primitive.h b/code/nel/include/nel/ligo/primitive.h index e131a89e5..733834722 100644 --- a/code/nel/include/nel/ligo/primitive.h +++ b/code/nel/include/nel/ligo/primitive.h @@ -211,7 +211,7 @@ public: /** Get the children primitive count */ uint getNumChildren () const { - return _Children.size (); + return (uint)_Children.size (); } /** Get a child primitive */ diff --git a/code/nel/include/nel/misc/algo.h b/code/nel/include/nel/misc/algo.h index 66321b5c7..a718e3e53 100644 --- a/code/nel/include/nel/misc/algo.h +++ b/code/nel/include/nel/misc/algo.h @@ -127,7 +127,7 @@ uint searchLowerBound(const T *array, uint arraySize, const T &key) template uint searchLowerBound(const std::vector &array, const T &key) { - uint size= array.size(); + uint size= (uint)array.size(); if(size==0) return 0; else diff --git a/code/nel/include/nel/misc/block_memory.h b/code/nel/include/nel/misc/block_memory.h index ec817794f..606ff6c32 100644 --- a/code/nel/include/nel/misc/block_memory.h +++ b/code/nel/include/nel/misc/block_memory.h @@ -71,7 +71,7 @@ public: { _BlockSize= other._BlockSize; // 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 _NextFreeElt= NULL; _NAllocatedElts= 0; diff --git a/code/nel/include/nel/misc/buf_fifo.h b/code/nel/include/nel/misc/buf_fifo.h index 7f5b2b1e7..697d5411f 100644 --- a/code/nel/include/nel/misc/buf_fifo.h +++ b/code/nel/include/nel/misc/buf_fifo.h @@ -68,7 +68,7 @@ public: ~CBufFIFO (); /// Push 'buffer' in the head of the FIFO - void push (const std::vector &buffer) { push (&buffer[0], buffer.size()); } + void push (const std::vector &buffer) { push (&buffer[0], (uint32)buffer.size()); } void push (const NLMISC::CMemStream &buffer) { push (buffer.buffer(), buffer.length()); } diff --git a/code/nel/include/nel/misc/diff_tool.h b/code/nel/include/nel/misc/diff_tool.h index 42fb5c859..b8a8db327 100644 --- a/code/nel/include/nel/misc/diff_tool.h +++ b/code/nel/include/nel/misc/diff_tool.h @@ -145,7 +145,7 @@ namespace STRING_MANAGER uint size() const { - return Data.size(); + return (uint)Data.size(); } void insertColumn(uint colIndex) @@ -230,7 +230,7 @@ namespace STRING_MANAGER // Return the first column for which the title does not begin with '*' if ( columnTitle[0] != '*' ) { - colIndex = (it - Data[0].begin()); + colIndex = (uint)(it - Data[0].begin()); return true; } } @@ -246,7 +246,7 @@ namespace STRING_MANAGER if (it == Data[0].end()) return false; - colIndex = it - Data[0].begin(); + colIndex = (uint)(it - Data[0].begin()); return true; } @@ -261,7 +261,7 @@ namespace STRING_MANAGER // resize the rows void resize(uint numRows) { - uint oldSize= Data.size(); + uint oldSize= (uint)Data.size(); Data.resize(numRows); // alloc good Column count for new lines for(uint i= oldSize;ioperator[](colIndex) == colValue) { - rowIndex = first - Data.begin(); + rowIndex = (uint)(first - Data.begin()); return true; } @@ -497,7 +497,7 @@ namespace STRING_MANAGER else { // 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(index, refCount, context); diff --git a/code/nel/include/nel/misc/event_emitter_multi.h b/code/nel/include/nel/misc/event_emitter_multi.h index 23ad2b8d4..b2350fc7f 100644 --- a/code/nel/include/nel/misc/event_emitter_multi.h +++ b/code/nel/include/nel/misc/event_emitter_multi.h @@ -41,7 +41,7 @@ public: /// test whether e is in the emitter list bool isEmitter(IEventEmitter *e) const; // Get the number of registered emitters - uint getNumEmitters() const { return _Emitters.size(); } + uint getNumEmitters() const { return (uint)_Emitters.size(); } // Get an emitter IEventEmitter *getEmitter(uint index); const IEventEmitter *getEmitter(uint index) const; diff --git a/code/nel/include/nel/misc/historic.h b/code/nel/include/nel/misc/historic.h index a35e703cb..5cf215fb5 100644 --- a/code/nel/include/nel/misc/historic.h +++ b/code/nel/include/nel/misc/historic.h @@ -46,7 +46,7 @@ public: // Set number of entries in the historic. Oldest entries are removed inline void setMaxSize(uint maxSize); // 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 const T &operator[](uint index) const { return _Historic[index]; /* let STL do out of range check */ } // Clear historic diff --git a/code/nel/include/nel/misc/input_device_server.h b/code/nel/include/nel/misc/input_device_server.h index e8688180b..ced6c07a8 100644 --- a/code/nel/include/nel/misc/input_device_server.h +++ b/code/nel/include/nel/misc/input_device_server.h @@ -43,7 +43,7 @@ public: /// remove a device from this server (but does not delete it). void removeDevice(IInputDevice *device); // returns the number of registered devices - uint getNumDevices() const { return _Devices.size(); } + uint getNumDevices() const { return (uint)_Devices.size(); } // return a device IInputDevice *getDevice(uint index) { return _Devices[index]; } /// Test whether the given device is handled by this server. diff --git a/code/nel/include/nel/misc/log.h b/code/nel/include/nel/misc/log.h index 49f42d1aa..8f07700f4 100644 --- a/code/nel/include/nel/misc/log.h +++ b/code/nel/include/nel/misc/log.h @@ -53,7 +53,7 @@ public: time_t Date; TLogType LogType; std::string ProcessName; - uint ThreadId; + size_t ThreadId; const char *FileName; sint Line; const char *FuncName; diff --git a/code/nel/include/nel/misc/mem_stream.h b/code/nel/include/nel/misc/mem_stream.h index e55a7afda..2102129dd 100644 --- a/code/nel/include/nel/misc/mem_stream.h +++ b/code/nel/include/nel/misc/mem_stream.h @@ -570,7 +570,7 @@ protected: #define writenumber(src,format,digits) \ char number_as_cstring [digits+1]; \ 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 diff --git a/code/nel/include/nel/misc/polygon.h b/code/nel/include/nel/misc/polygon.h index b92c276a2..212782cfa 100644 --- a/code/nel/include/nel/misc/polygon.h +++ b/code/nel/include/nel/misc/polygon.h @@ -52,7 +52,7 @@ public: /// Constructor. Init with a triangle. 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' void toTriFan(std::vector &dest) const; diff --git a/code/nel/include/nel/misc/stream.h b/code/nel/include/nel/misc/stream.h index e3d4a538d..a0fdc63d9 100644 --- a/code/nel/include/nel/misc/stream.h +++ b/code/nel/include/nel/misc/stream.h @@ -1057,7 +1057,7 @@ private: } else { - len= cont.size(); + len= (sint32)cont.size(); serial(len); } @@ -1116,7 +1116,7 @@ protected: } else { - len= cont.size(); + len = (sint32)cont.size(); serial(len); // Close the node header @@ -1238,7 +1238,7 @@ private: } else { - len= cont.size(); + len= (sint32)cont.size(); serial(len); } @@ -1393,7 +1393,7 @@ private: } else { - len= cont.size(); + len= (sint32)cont.size(); serial(len); } @@ -1587,7 +1587,7 @@ private: } else { - len= cont.size(); + len= (sint32)cont.size(); serial(len); __iterator it= cont.begin(); diff --git a/code/nel/include/nel/misc/string_conversion.h b/code/nel/include/nel/misc/string_conversion.h index 5214c1f66..5d5540358 100644 --- a/code/nel/include/nel/misc/string_conversion.h +++ b/code/nel/include/nel/misc/string_conversion.h @@ -97,7 +97,7 @@ public: const std::string &toString(const TDestType &value) const; // 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 bool isValid(const DestType &value) const; diff --git a/code/nel/include/nel/misc/string_id_array.h b/code/nel/include/nel/misc/string_id_array.h index 3e344d381..1a0ec1eb3 100644 --- a/code/nel/include/nel/misc/string_id_array.h +++ b/code/nel/include/nel/misc/string_id_array.h @@ -71,7 +71,7 @@ public: nlassert (!str.empty()); // 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 @@ -138,7 +138,7 @@ public: /// Returns the size of the _StringArray TStringId size () const { - return _StringArray.size (); + return (TStringId)_StringArray.size (); } /// Returns all string in the _NeedToAskStringArray diff --git a/code/nel/include/nel/misc/value_smoother.h b/code/nel/include/nel/misc/value_smoother.h index 351ec195a..aea9e5ad3 100644 --- a/code/nel/include/nel/misc/value_smoother.h +++ b/code/nel/include/nel/misc/value_smoother.h @@ -87,7 +87,7 @@ public: _CurFrame++; // _CurFrame%=_LastFrames.size(); if (_CurFrame >= _LastFrames.size()) - _CurFrame -= _LastFrames.size(); + _CurFrame -= (uint)_LastFrames.size(); // update the number of frames added. _NumFrame++; diff --git a/code/nel/include/nel/net/buf_server.h b/code/nel/include/nel/net/buf_server.h index 8d74babb6..613754a9d 100644 --- a/code/nel/include/nel/net/buf_server.h +++ b/code/nel/include/nel/net/buf_server.h @@ -420,7 +420,7 @@ public: uint nb; { NLMISC::CSynchronized::CAccessor connectionssync( &_Connections ); - nb = connectionssync.value().size(); + nb = (uint)connectionssync.value().size(); } return nb; } diff --git a/code/nel/include/nel/sound/audio_mixer_user.h b/code/nel/include/nel/sound/audio_mixer_user.h index e36b3c872..be5dfb356 100644 --- a/code/nel/include/nel/sound/audio_mixer_user.h +++ b/code/nel/include/nel/sound/audio_mixer_user.h @@ -237,9 +237,9 @@ public: /// Return the names of the sounds (call this method after loadSounds()) virtual void getSoundNames( std::vector &names ) const; /// 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. - virtual uint getSourcesInstanceCount() const { return _Sources.size(); } + virtual uint getSourcesInstanceCount() const { return (uint)_Sources.size(); } /// Return the number of playing sources (slow) virtual uint getPlayingSourcesCount() const; /// Return the number of available tracks diff --git a/code/nel/include/nel/sound/sound_animation.h b/code/nel/include/nel/sound/sound_animation.h index 276eb50d0..162f87c5d 100644 --- a/code/nel/include/nel/sound/sound_animation.h +++ b/code/nel/include/nel/sound/sound_animation.h @@ -54,7 +54,7 @@ public: /** 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 */ virtual CSoundAnimMarker* getMarker(uint32 i) { return _Markers[i]; }