From 9dcd284614b22e5400441b406a841520ce47f4d8 Mon Sep 17 00:00:00 2001 From: kervala Date: Thu, 27 May 2010 19:07:17 +0200 Subject: [PATCH] Changed: #825 Remove all warning when compiling Ryzom on Linux --- .../georges_convert/form_body_elt_struct.cpp | 2 +- .../leveldesign/georges_convert/item.cpp | 10 +++---- .../tools/leveldesign/georges_convert/item.h | 8 ++--- .../mission_compiler_lib/mission_compiler.h | 4 +-- .../mission_compiler_lib/step_content.cpp | 30 +++++++++---------- .../tools/leveldesign/mp_generator/main.cpp | 2 +- .../tools/leveldesign/mp_generator/utils.h | 2 +- .../primitive_id_assignator.cpp | 8 ++--- .../world_editor/land_export_lib/export.cpp | 12 ++++---- 9 files changed, 39 insertions(+), 39 deletions(-) diff --git a/code/ryzom/tools/leveldesign/georges_convert/form_body_elt_struct.cpp b/code/ryzom/tools/leveldesign/georges_convert/form_body_elt_struct.cpp index 88b3bc90e..98032bf9b 100644 --- a/code/ryzom/tools/leveldesign/georges_convert/form_body_elt_struct.cpp +++ b/code/ryzom/tools/leveldesign/georges_convert/form_body_elt_struct.cpp @@ -162,7 +162,7 @@ bool CFormBodyEltStruct::Empty() const uint32 CFormBodyEltStruct::GetNbElt () const { - return vpbodyelt.size(); + return (uint32)vpbodyelt.size(); } CFormBodyElt* CFormBodyEltStruct::GetElt( const unsigned int _index ) const diff --git a/code/ryzom/tools/leveldesign/georges_convert/item.cpp b/code/ryzom/tools/leveldesign/georges_convert/item.cpp index e8de6eefb..4c0f79235 100644 --- a/code/ryzom/tools/leveldesign/georges_convert/item.cpp +++ b/code/ryzom/tools/leveldesign/georges_convert/item.cpp @@ -235,19 +235,19 @@ void CItem::SetCurrentValue( const unsigned int _index, const CStringEx s ) pitemes->SetModified( _index ); } -unsigned int CItem::GetNbElt() const +uint CItem::GetNbElt() const { if( pitemes ) return( pitemes->GetNbElt() ); return( 0 ); } -unsigned int CItem::GetNbParents() const +uint CItem::GetNbParents() const { - return( vsxparents.size() ); + return (uint)vsxparents.size(); } -unsigned int CItem::GetNbElt( const unsigned int _index ) const +uint CItem::GetNbElt( const unsigned int _index ) const { CItemElt* pie = GetElt( _index ); if( !pie ) @@ -255,7 +255,7 @@ unsigned int CItem::GetNbElt( const unsigned int _index ) const return( pie->GetNbElt() ); } -unsigned int CItem::GetInfos( const unsigned int _index ) const +uint CItem::GetInfos( const unsigned int _index ) const { CItemElt* pie = GetElt( _index ); if( !pie ) diff --git a/code/ryzom/tools/leveldesign/georges_convert/item.h b/code/ryzom/tools/leveldesign/georges_convert/item.h index 795d0dde5..72e685f92 100644 --- a/code/ryzom/tools/leveldesign/georges_convert/item.h +++ b/code/ryzom/tools/leveldesign/georges_convert/item.h @@ -57,10 +57,10 @@ public: void MakeItem (CForm &in); void SetCurrentValue( const unsigned int _index, const CStringEx s ); - unsigned int GetNbElt() const; - unsigned int GetNbParents() const; - unsigned int GetNbElt( const unsigned int _index ) const; - unsigned int GetInfos( const unsigned int _index ) const; + uint GetNbElt() const; + uint GetNbParents() const; + uint GetNbElt( const unsigned int _index ) const; + uint GetInfos( const unsigned int _index ) const; CStringEx GetName( const unsigned int _index ) const; CStringEx GetCurrentResult( const unsigned int _index ) const; CStringEx GetCurrentValue( const unsigned int _index ) const; diff --git a/code/ryzom/tools/leveldesign/mission_compiler_lib/mission_compiler.h b/code/ryzom/tools/leveldesign/mission_compiler_lib/mission_compiler.h index 01d9d69e4..aa84dd3a4 100644 --- a/code/ryzom/tools/leveldesign/mission_compiler_lib/mission_compiler.h +++ b/code/ryzom/tools/leveldesign/mission_compiler_lib/mission_compiler.h @@ -457,7 +457,7 @@ public: /// Get full paths of files to publish - uint getFileToPublishCount() { return _FilesToPublish.size(); } + uint getFileToPublishCount() { return (uint)_FilesToPublish.size(); } std::string getFileToPublish(uint index) { nlassert(index < _FilesToPublish.size()); return _FilesToPublish[index]; } @@ -467,7 +467,7 @@ public: } uint getMissionsCount() { - return _CompiledMission.size(); + return (uint)_CompiledMission.size(); } TMissionDataPtr getMission(uint index) { diff --git a/code/ryzom/tools/leveldesign/mission_compiler_lib/step_content.cpp b/code/ryzom/tools/leveldesign/mission_compiler_lib/step_content.cpp index 333b2c418..ce9cfada5 100644 --- a/code/ryzom/tools/leveldesign/mission_compiler_lib/step_content.cpp +++ b/code/ryzom/tools/leveldesign/mission_compiler_lib/step_content.cpp @@ -1677,7 +1677,7 @@ class CContentKill : public CContentObjective { if (!_KillFaunas.empty()) { - numEntry = _KillFaunas.size(); + numEntry = (uint32)_KillFaunas.size(); predef.resize(numEntry); for (uint i=0; i<_KillFaunas.size(); ++i) { @@ -1691,7 +1691,7 @@ class CContentKill : public CContentObjective } else if (!_KillRaces.empty()) { - numEntry = _KillRaces.size(); + numEntry = (uint32)_KillRaces.size(); predef.resize(numEntry); for (uint i=0; i<_KillRaces.size(); ++i) { @@ -1712,7 +1712,7 @@ class CContentKill : public CContentObjective } else if (!_KillNpcs.empty()) { - numEntry = _KillNpcs.size(); + numEntry = (uint32)_KillNpcs.size(); predef.resize(numEntry); for (uint i=0; i<_KillNpcs.size(); ++i) { @@ -2013,7 +2013,7 @@ class CContentCast : public CContentObjective void getPredefParam(uint32 &numEntry, CPhrase::TPredefParams &predef) { - numEntry = _Actions.size(); + numEntry = (uint32)_Actions.size(); predef.resize(numEntry); for (uint i=0; i::const_iterator ik=item.Fields[c].begin(); ik!=item.Fields[c].end(); ++ik ) { - _Indices[c].insert( make_pair( *ik, _Items.size()-1 ) ); + _Indices[c].insert( make_pair( *ik, (uint32)_Items.size()-1 ) ); } } } diff --git a/code/ryzom/tools/leveldesign/primitive_id_assignator/primitive_id_assignator.cpp b/code/ryzom/tools/leveldesign/primitive_id_assignator/primitive_id_assignator.cpp index 276e91d7c..9d93fdbee 100644 --- a/code/ryzom/tools/leveldesign/primitive_id_assignator/primitive_id_assignator.cpp +++ b/code/ryzom/tools/leveldesign/primitive_id_assignator/primitive_id_assignator.cpp @@ -29,7 +29,7 @@ int main(int argc, char *argv[]) // Add the search paths CConfigFile::CVar &sp = cf.getVar("SearchPath"); - for (int i=0; i files; CPath::getFileList(ext.asString(i), files); @@ -95,7 +95,7 @@ int main(int argc, char *argv[]) // check the first on full path bool filtered = false; string path = CPath::lookup(fileName); - for (int i=0; i(i, DstPI.size()-1)); + OldToNewPatchId.insert (pair(i, (int)DstPI.size()-1)); } } @@ -1940,7 +1940,7 @@ void CExport::cutZone (NL3D::CZone &bigZone, NL3D::CZone &bigZoneNoHeightmap, NL PatchTransfered[i] = true; DstPI.push_back (rPI); DstPINoHeightmap.push_back (rPINoHeightmap); - OldToNewPatchId.insert (pair(i, DstPI.size()-1)); + OldToNewPatchId.insert (pair(i, (int)DstPI.size()-1)); foundOne = true; break; } @@ -1956,7 +1956,7 @@ void CExport::cutZone (NL3D::CZone &bigZone, NL3D::CZone &bigZoneNoHeightmap, NL while (foundOne); // Add all patch that are binded to one of those of the DstPI list - uint32 nPreviousDstPISize = DstPI.size(); + uint32 nPreviousDstPISize = (uint32)DstPI.size(); for (;;) { for (i = 0; i < DstPI.size(); ++i) @@ -1977,7 +1977,7 @@ void CExport::cutZone (NL3D::CZone &bigZone, NL3D::CZone &bigZoneNoHeightmap, NL } DstPI.push_back (rPITmp); DstPINoHeightmap.push_back (rPITmpNoHeightmap); - OldToNewPatchId.insert (pair(next, DstPI.size()-1)); + OldToNewPatchId.insert (pair(next, (int)DstPI.size()-1)); PatchTransfered[next] = true; } } @@ -1998,7 +1998,7 @@ void CExport::cutZone (NL3D::CZone &bigZone, NL3D::CZone &bigZoneNoHeightmap, NL } DstPI.push_back (rPITmp); DstPINoHeightmap.push_back (rPITmpNoHeightmap); - OldToNewPatchId.insert (pair(next, DstPI.size()-1)); + OldToNewPatchId.insert (pair(next, (int)DstPI.size()-1)); PatchTransfered[next] = true; } } @@ -2009,7 +2009,7 @@ void CExport::cutZone (NL3D::CZone &bigZone, NL3D::CZone &bigZoneNoHeightmap, NL // Do it until no more patch added if (nPreviousDstPISize == DstPI.size()) break; - nPreviousDstPISize = DstPI.size(); + nPreviousDstPISize = (uint32)DstPI.size(); } for (i = 0; i < DstPI.size(); ++i)