From: Viktor Uzlov Date: Thu, 13 Aug 2020 12:20:11 +0000 (+0300) Subject: fix warning "unused variable", "possible loss of data", "unreferenced formal parametr... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=86717a7f337a32c3c32a90ced1775b5977aba837;p=modules%2Fkernel.git fix warning "unused variable", "possible loss of data", "unreferenced formal parametr", "signed/unsigned mismatch" --- diff --git a/src/Basics/Basics_Utils.hxx b/src/Basics/Basics_Utils.hxx index 387514396..c28344a9e 100644 --- a/src/Basics/Basics_Utils.hxx +++ b/src/Basics/Basics_Utils.hxx @@ -28,7 +28,7 @@ #include "SALOME_Basics.hxx" #include #include - +#define SALOME_UNUSED(var) (void)var #ifndef WIN32 #include #else diff --git a/src/Communication/SALOME_Comm_i.cxx b/src/Communication/SALOME_Comm_i.cxx index 75af1c528..598802373 100644 --- a/src/Communication/SALOME_Comm_i.cxx +++ b/src/Communication/SALOME_Comm_i.cxx @@ -180,7 +180,7 @@ CORBA::ULong SALOME_CorbaDoubleCSender_i::getSize(){ SALOME::vectorOfDouble* SALOME_CorbaDoubleCSender_i::sendPart(CORBA::ULong offset, CORBA::ULong length){ SALOME::vectorOfDouble_var c1 = new SALOME::vectorOfDouble; c1->length(length); - for (long i=0; ilength(length); - for (long i=0; ilength(_fieldsDict.size()); + copie->length((_CORBA_ULong)_fieldsDict.size()); //!< TODO: conversion from size_t to _CORBA_ULong std::map::iterator it; CORBA::ULong i = 0; for (it = _fieldsDict.begin(); it != _fieldsDict.end(); it++, i++) @@ -881,7 +881,7 @@ Engines::TMPFile* Engines_Component_i::DumpPython(CORBA::Boolean isPublished, char* aBuffer = new char[strlen(aScript)+1]; strcpy(aBuffer, aScript); CORBA::Octet* anOctetBuf = (CORBA::Octet*)aBuffer; - int aBufferSize = strlen(aBuffer)+1; + int aBufferSize = (int)strlen(aBuffer)+1; //!< TODO: conversion from size_t to int Engines::TMPFile_var aStreamFile = new Engines::TMPFile(aBufferSize, aBufferSize, anOctetBuf, 1); isValidScript = true; return aStreamFile._retn(); diff --git a/src/Container/Container_i.cxx b/src/Container/Container_i.cxx index 556bcc8ce..1f25c1bfc 100644 --- a/src/Container/Container_i.cxx +++ b/src/Container/Container_i.cxx @@ -368,7 +368,7 @@ void Engines_Container_i::Shutdown() { itm->second->destroy(); } - catch(const CORBA::Exception& e) + catch(const CORBA::Exception& /*e*/) //!< TODO: unused variable { // ignore this entry and continue } @@ -1303,7 +1303,7 @@ Engines_Container_i::find_or_create_instance(std::string genericRegisterName, bool Engines_Container_i::isPythonContainer(const char* ContainerName) { bool ret=false; - int len=strlen(ContainerName); + size_t len=strlen(ContainerName); if(len>=2) if(strcmp(ContainerName+len-2,"Py")==0) ret=true; @@ -1542,7 +1542,7 @@ Engines_Container_i::createSalome_file(const char* origFileName) aSalome_file->setLocalFile(origFileName); aSalome_file->recvFiles(); } - catch (const SALOME::SALOME_Exception& e) + catch (const SALOME::SALOME_Exception& /*e*/) //!< TODO: unused variable { return Engines::Salome_file::_nil(); } diff --git a/src/Container/Container_init_python.cxx b/src/Container/Container_init_python.cxx index ff5e639ad..2f7671096 100644 --- a/src/Container/Container_init_python.cxx +++ b/src/Container/Container_init_python.cxx @@ -171,7 +171,7 @@ void KERNEL_PYTHON::init_python(int argc, char **argv) MESSAGE("================================================================="); // set stdout to line buffering (aka C++ std::cout) setvbuf(stdout, (char *)NULL, _IOLBF, BUFSIZ); - wchar_t* salome_python; + wchar_t* salome_python; //!< TODO: unused variable char* env_python=getenv("SALOME_PYTHON"); if(env_python != 0) { diff --git a/src/Container/SALOME_ContainerManager.cxx b/src/Container/SALOME_ContainerManager.cxx index 9696a0b71..1b7467784 100644 --- a/src/Container/SALOME_ContainerManager.cxx +++ b/src/Container/SALOME_ContainerManager.cxx @@ -1417,7 +1417,7 @@ long SALOME_ContainerManager::SystemWithPIDThreadSafe(const std::vectorreplace(nbRed, nbRed, buf, 1); // 1 means give ownership return aBlock; diff --git a/src/Container/Salome_file_i.cxx b/src/Container/Salome_file_i.cxx index 0f481ab78..dc4026224 100644 --- a/src/Container/Salome_file_i.cxx +++ b/src/Container/Salome_file_i.cxx @@ -1059,7 +1059,7 @@ Salome_file_i::getBlock(CORBA::Long fileId) CORBA::Octet *buf; buf = Engines::fileBlock::allocbuf(FILEBLOCK_SIZE); size_t nbRed = fread(buf, sizeof(CORBA::Octet), FILEBLOCK_SIZE, fp); - aBlock->replace(nbRed, nbRed, buf, 1); // 1 means give ownership + aBlock->replace((_CORBA_ULong)nbRed, (_CORBA_ULong)nbRed, buf, 1); // 1 means give ownership //!< TODO: conversion from size_t to _CORBA_ULong return aBlock; } diff --git a/src/Launcher/Launcher.hxx b/src/Launcher/Launcher.hxx index 3958a8092..490e065d5 100644 --- a/src/Launcher/Launcher.hxx +++ b/src/Launcher/Launcher.hxx @@ -112,7 +112,7 @@ protected: // Used by SALOME_Launcher std::shared_ptr _ResManager; - virtual void notifyObservers(const std::string & event_name, const std::string & event_data) {} + virtual void notifyObservers(const std::string & event_name, const std::string & event_data) { SALOME_UNUSED(event_name); SALOME_UNUSED(event_data);} int addJob(Launcher::Job * new_job); // Methods used by user interface methods diff --git a/src/Launcher/SALOME_ExternalServerLauncher.cxx b/src/Launcher/SALOME_ExternalServerLauncher.cxx index 89b18b919..4fa306f24 100644 --- a/src/Launcher/SALOME_ExternalServerLauncher.cxx +++ b/src/Launcher/SALOME_ExternalServerLauncher.cxx @@ -93,7 +93,7 @@ SALOME::ExternalServerHandler_ptr SALOME_ExternalServerLauncher::launchServer(co } std::vector cmd(command_list.length()); const char *toto(command_list[0]); - for(auto i=0;i loes(ListOfExternalServersCpp(_NS)); std::size_t sz(loes.size()); - ret->length(sz); + ret->length((_CORBA_ULong)sz); //!< TODO: conversion from size_t to _CORBA_ULong for(auto i = 0; i ret(new SALOME::ByteVec); - ret->length(size); + ret->length((_CORBA_ULong)size); //!< TODO: conversion from size_t to _CORBA_ULong for(std::size_t i=0;ijob_file = CORBA::string_dup(job_parameters.job_file.c_str()); result->pre_command = CORBA::string_dup(job_parameters.pre_command.c_str()); result->env_file = CORBA::string_dup(job_parameters.env_file.c_str()); - result->in_files.length(job_parameters.in_files.size()); + result->in_files.length((_CORBA_ULong)job_parameters.in_files.size()); //!< TODO: conversion from size_t to _CORBA_ULong int i = 0; for(const std::string& it : job_parameters.in_files) @@ -635,7 +635,7 @@ SALOME_Launcher::JobParameters_CPP2CORBA(const JobParameters_cpp& job_parameters result->in_files[i] = CORBA::string_dup(it.c_str()); i++; } - result->out_files.length(job_parameters.out_files.size()); + result->out_files.length((_CORBA_ULong)job_parameters.out_files.size()); //!< TODO: conversion from size_t to _CORBA_ULong i = 0; for(const std::string& it : job_parameters.out_files) { @@ -661,7 +661,7 @@ SALOME_Launcher::JobParameters_CPP2CORBA(const JobParameters_cpp& job_parameters = job_parameters.specific_parameters; if (!specific_parameters.empty()) { - result->specific_parameters.length(specific_parameters.size()); + result->specific_parameters.length((_CORBA_ULong)specific_parameters.size()); //!< TODO: conversion from size_t to _CORBA_ULong CORBA::ULong i = 0; for (const auto& it_specific : specific_parameters) { diff --git a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx index 4a5fbf688..da2a41b33 100644 --- a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx +++ b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx @@ -278,7 +278,7 @@ SALOME_LifeCycleCORBA::FindOrLoad_Component(const char *containerName, // --- Check if containerName contains machine name (if yes: rg>0) char *stContainer=strdup(containerName); std::string st2Container(stContainer); - int rg=st2Container.find("/"); + int rg=(int)st2Container.find("/"); //!< TODO: conversion from size_t to int Engines::ContainerParameters params; preSet(params); diff --git a/src/NamingService/SALOME_NamingService.cxx b/src/NamingService/SALOME_NamingService.cxx index 6d92a9fc2..071a7954f 100644 --- a/src/NamingService/SALOME_NamingService.cxx +++ b/src/NamingService/SALOME_NamingService.cxx @@ -877,7 +877,7 @@ char *SALOME_NamingService::Current_Directory() throw(ServiceUnreachable) } std::string path; - lengthPath = splitPath.size(); + lengthPath = (int)splitPath.size(); //!< TODO: conversion from size_t to int for (int k = 0 ; k < lengthPath ;k++) { path += "/"; diff --git a/src/Registry/RegistryService.cxx b/src/Registry/RegistryService.cxx index 63717c551..1125996c6 100644 --- a/src/Registry/RegistryService.cxx +++ b/src/Registry/RegistryService.cxx @@ -83,7 +83,7 @@ CORBA::ULong RegistryService::size ( void ) { ASSERT(_SessionName) ; ASSERT(strlen(_SessionName)>0) ; - return _reg.size() ; + return (CORBA::ULong)_reg.size() ; //!< TODO: conversion from size_t to CORBA::ULong } CORBA::ULong RegistryService::add( const Registry::Infos & infos ) @@ -167,7 +167,7 @@ Registry::AllInfos* RegistryService::makeseq(std::map &mymap Registry::AllInfos *all = new Registry::AllInfos ; ASSERT(all) ; const size_t RegLength = mymap.size(); - all->length(RegLength); + all->length((_CORBA_ULong)RegLength); //!< TODO: conversion from size_t to _CORBA_ULong std::map::iterator im; for (im=mymap.begin();im!=mymap.end(); im++) diff --git a/src/ResourcesManager/SALOME_LoadRateManager.hxx b/src/ResourcesManager/SALOME_LoadRateManager.hxx index e5863ae66..e56999ad7 100644 --- a/src/ResourcesManager/SALOME_LoadRateManager.hxx +++ b/src/ResourcesManager/SALOME_LoadRateManager.hxx @@ -31,8 +31,7 @@ class RESOURCESMANAGER_EXPORT LoadRateManager { public: - virtual std::string Find(const std::vector& hosts, - const MapOfParserResourcesType& resList) { return ""; } + virtual std::string Find(const std::vector& hosts, const MapOfParserResourcesType& resList) { SALOME_UNUSED(hosts); SALOME_UNUSED(resList); return ""; } }; class RESOURCESMANAGER_EXPORT LoadRateManagerFirst : public LoadRateManager diff --git a/src/ResourcesManager/SALOME_ResourcesManager_Common.cxx b/src/ResourcesManager/SALOME_ResourcesManager_Common.cxx index 99a05b63b..021a742b5 100644 --- a/src/ResourcesManager/SALOME_ResourcesManager_Common.cxx +++ b/src/ResourcesManager/SALOME_ResourcesManager_Common.cxx @@ -37,7 +37,7 @@ template typename T::_var_type strvec_CPPtoCORBA(const vector & strvecCpp) { typename T::_var_type strvecCorba = new T; - strvecCorba->length(strvecCpp.size()); + strvecCorba->length((_CORBA_ULong)strvecCpp.size()); //!< TODO: conversion from size_t to _CORBA_ULong for(unsigned int i=0;ilength(length); for(int i = 0; ilength(length); for(int i = 0; ilength(length); for(int i = 0; i v = dynamic_cast(_impl)->GetRealArray(theID); - int length = v.size(); + int length = (int)v.size(); //!< TODO: conversion from size_t to int if(length) { aSeq->length(length); for(int i = 0; i v = dynamic_cast(_impl)->GetIntArray(theID); - int length = v.size(); + int length = (int)v.size(); //!< TODO: conversion from size_t to int if(length) { aSeq->length(length); for(int i = 0; i v = dynamic_cast(_impl)->GetStrArray(theID); - int length = v.size(); + int length = (int)v.size(); //!< TODO: conversion from size_t to int if(length) { aSeq->length(length); for(int i = 0; i A = dynamic_cast(_impl)->GetIDs((Parameter_Types)theType); if(A.size()) { - int length = A.size(); + int length = (int)A.size(); //!< TODO: conversion from size_t to int CorbaSeq->length(length); for (int i = 0; i < length; i++) CorbaSeq[i] = CORBA::string_dup(A[i].c_str());; } diff --git a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger.cxx b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger.cxx index 15321247f..b57b3c441 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger.cxx @@ -42,7 +42,7 @@ SALOMEDS_AttributeSequenceOfInteger::~SALOMEDS_AttributeSequenceOfInteger() void SALOMEDS_AttributeSequenceOfInteger::Assign(const std::vector& other) { - int i, aLength = other.size(); + int i, aLength = (int)other.size(); //!< TODO: conversion from size_t to int if (_isLocal) { CheckLocked(); SALOMEDS::Locker lock; @@ -71,7 +71,7 @@ std::vector SALOMEDS_AttributeSequenceOfInteger::CorbaSequence() SALOMEDS::AttributeSequenceOfInteger_var aSeqAttr = SALOMEDS::AttributeSequenceOfInteger::_narrow(_corba_impl); aLength = aSeqAttr->Length(); - for (i = 1; i <=aLength; i++) aVector.push_back(aSeqAttr->Value(i)); + for (i = 1; i <=aLength; i++) aVector.push_back(aSeqAttr->Value((CORBA::Short)i)); //!< TODO: conversion from int to CORBA::Short } return aVector; } @@ -113,7 +113,7 @@ int SALOMEDS_AttributeSequenceOfInteger::Value(int index) SALOMEDS::Locker lock; aValue = dynamic_cast(_local_impl)->Value(index); } - else aValue = SALOMEDS::AttributeSequenceOfInteger::_narrow(_corba_impl)->Value(index); + else aValue = SALOMEDS::AttributeSequenceOfInteger::_narrow(_corba_impl)->Value((CORBA::Short)index); //!< TODO: conversion from int to CORBA::Short return aValue; } diff --git a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger_i.cxx index 6499ece13..e690fdd6c 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger_i.cxx @@ -43,7 +43,7 @@ SALOMEDS::LongSeq* SALOMEDS_AttributeSequenceOfInteger_i::CorbaSequence() SALOMEDS::Locker lock; SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq; const std::vector& CasCadeSeq = dynamic_cast(_impl)->Array(); - int len = CasCadeSeq.size(); + int len = (int)CasCadeSeq.size(); //!< TODO: conversion from size_t to int CorbaSeq->length(len); for (int i = 0; i < len; i++) { CorbaSeq[i] = CasCadeSeq[i]; diff --git a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal.cxx b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal.cxx index ca65354fe..a15939e7b 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal.cxx @@ -42,7 +42,7 @@ SALOMEDS_AttributeSequenceOfReal::~SALOMEDS_AttributeSequenceOfReal() void SALOMEDS_AttributeSequenceOfReal::Assign(const std::vector& other) { - int i, aLength = other.size(); + int i, aLength = (int)other.size(); //!< TODO: conversion from size_t to int if (_isLocal) { CheckLocked(); SALOMEDS::Locker lock; @@ -70,7 +70,7 @@ std::vector SALOMEDS_AttributeSequenceOfReal::CorbaSequence() else { SALOMEDS::AttributeSequenceOfReal_var aSeqAttr = SALOMEDS::AttributeSequenceOfReal::_narrow(_corba_impl); aLength = aSeqAttr->Length(); - for (i = 1; i <=aLength; i++) aVector.push_back(aSeqAttr->Value(i)); + for (i = 1; i <=aLength; i++) aVector.push_back(aSeqAttr->Value((CORBA::Short)i)); //!< TODO: conversion from int to CORBA::Short } return aVector; } @@ -112,7 +112,7 @@ double SALOMEDS_AttributeSequenceOfReal::Value(int index) SALOMEDS::Locker lock; aValue = dynamic_cast(_local_impl)->Value(index); } - else aValue = SALOMEDS::AttributeSequenceOfReal::_narrow(_corba_impl)->Value(index); + else aValue = SALOMEDS::AttributeSequenceOfReal::_narrow(_corba_impl)->Value((CORBA::Short)index); //!< TODO: conversion from int to CORBA::Short return aValue; } diff --git a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal_i.cxx index 4dc1be96e..4fa0a95fb 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal_i.cxx @@ -33,8 +33,8 @@ void SALOMEDS_AttributeSequenceOfReal_i::Assign(const SALOMEDS::DoubleSeq& other SALOMEDS::Locker lock; CheckLocked(); std::vector CasCadeSeq; - for (int i = 0; i < other.length(); i++) { - CasCadeSeq.push_back(other[i]); + for (size_t i = 0; i < other.length(); i++) { + CasCadeSeq.push_back(other[(_CORBA_ULong)i]); //!< TODO: conversion from size_t to _CORBA_ULong } dynamic_cast(_impl)->Assign(CasCadeSeq); } @@ -44,7 +44,7 @@ SALOMEDS::DoubleSeq* SALOMEDS_AttributeSequenceOfReal_i::CorbaSequence() SALOMEDS::Locker lock; SALOMEDS::DoubleSeq_var CorbaSeq = new SALOMEDS::DoubleSeq; const std::vector& CasCadeSeq = dynamic_cast(_impl)->Array(); - int len = CasCadeSeq.size(); + int len = (int)CasCadeSeq.size(); //!< TODO: conversion from size_t to int CorbaSeq->length(len); for (int i = 0; i < len; i++) { CorbaSeq[i] = CasCadeSeq[i]; diff --git a/src/SALOMEDS/SALOMEDS_AttributeStudyProperties.cxx b/src/SALOMEDS/SALOMEDS_AttributeStudyProperties.cxx index 826662171..db7b3d704 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeStudyProperties.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeStudyProperties.cxx @@ -242,7 +242,7 @@ void SALOMEDS_AttributeStudyProperties::GetModificationsList(std::vector aMinutes, aHours, aDays, aMonths, aYears; SALOMEDSImpl_AttributeStudyProperties* anImpl = dynamic_cast(_local_impl); anImpl->GetModifications(aNames, aMinutes, aHours, aDays, aMonths, aYears); - aLength = aNames.size(); + aLength = (int)aNames.size(); //!< TODO: conversion from size_t to int i = ((theWithCreator) ? 1 : 2); for (; i <= aLength; i++) { theNames.push_back(aNames[i-1]); diff --git a/src/SALOMEDS/SALOMEDS_AttributeStudyProperties_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeStudyProperties_i.cxx index 8371c1ac1..ff918dd80 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeStudyProperties_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeStudyProperties_i.cxx @@ -163,7 +163,7 @@ void SALOMEDS_AttributeStudyProperties_i::GetModificationsList(SALOMEDS::StringS std::vector aMinutes, aHours, aDays, aMonths, aYears; SALOMEDSImpl_AttributeStudyProperties* aProp = dynamic_cast(_impl); aProp->GetModifications(aNames, aMinutes, aHours, aDays, aMonths, aYears); - int aLength = aNames.size(); + int aLength = (int)aNames.size(); //!< TODO: conversion from size_t to int int aRetLength = aLength - ((theWithCreator) ? 0 : 1); theNames = new SALOMEDS::StringSeq; theMinutes = new SALOMEDS::LongSeq; @@ -223,7 +223,7 @@ SALOMEDS::StringSeq* SALOMEDS_AttributeStudyProperties_i::GetStoredComponents() SALOMEDS::Locker lock; std::vector components = dynamic_cast(_impl)->GetStoredComponents(); SALOMEDS::StringSeq_var c_components = new SALOMEDS::StringSeq(); - c_components->length(components.size()); + c_components->length((_CORBA_ULong)components.size()); //!< TODO: conversion from size_t to _CORBA_ULong for (int i = 0; i < components.size(); i++) { c_components[i] = CORBA::string_dup(components[i].c_str()); } @@ -243,7 +243,7 @@ SALOMEDS::StringSeq* SALOMEDS_AttributeStudyProperties_i::GetComponentVersions(c SALOMEDS::Locker lock; std::vector versions = dynamic_cast(_impl)->GetComponentVersions(theComponent); SALOMEDS::StringSeq_var c_versions = new SALOMEDS::StringSeq(); - c_versions->length(versions.size()); + c_versions->length((_CORBA_ULong)versions.size()); //!< TODO: conversion from size_t to _CORBA_ULong for (int i = 0; i < versions.size(); i++) { c_versions[i] = CORBA::string_dup(versions[i].c_str()); } diff --git a/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger.cxx b/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger.cxx index b4a4dd332..1f1aecc60 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger.cxx @@ -92,7 +92,7 @@ std::string SALOMEDS_AttributeTableOfInteger::GetRowTitle(int theIndex) void SALOMEDS_AttributeTableOfInteger::SetRowTitles(const std::vector& theTitles) { - int aLength = theTitles.size(), i; + int aLength = (int)theTitles.size(), i; //!< TODO: conversion from size_t to int if (_isLocal) { CheckLocked(); SALOMEDS::Locker lock; @@ -155,7 +155,7 @@ std::string SALOMEDS_AttributeTableOfInteger::GetColumnTitle(int theIndex) void SALOMEDS_AttributeTableOfInteger::SetColumnTitles(const std::vector& theTitles) { - int aLength = theTitles.size(), i; + int aLength = (int)theTitles.size(), i; //!< TODO: conversion from size_t to int if (_isLocal) { CheckLocked(); SALOMEDS::Locker lock; @@ -217,7 +217,7 @@ std::string SALOMEDS_AttributeTableOfInteger::GetRowUnit(int theIndex) void SALOMEDS_AttributeTableOfInteger::SetRowUnits(const std::vector& theUnits) { - int aLength = theUnits.size(), i; + int aLength = (int)theUnits.size(), i; //!< TODO: conversion from size_t to int if (_isLocal) { CheckLocked(); SALOMEDS::Locker lock; @@ -272,7 +272,7 @@ int SALOMEDS_AttributeTableOfInteger::GetNbColumns() void SALOMEDS_AttributeTableOfInteger::AddRow(const std::vector& theData) { - int aLength = theData.size(), i; + int aLength = (int)theData.size(), i; //!< TODO: conversion from size_t to int if (_isLocal) { CheckLocked(); SALOMEDS::Locker lock; @@ -294,7 +294,7 @@ void SALOMEDS_AttributeTableOfInteger::AddRow(const std::vector& theData) void SALOMEDS_AttributeTableOfInteger::SetRow(int theRow, const std::vector& theData) { - int aLength = theData.size(), i; + int aLength = (int)theData.size(), i; //!< TODO: conversion from size_t to int if (_isLocal) { CheckLocked(); SALOMEDS::Locker lock; @@ -333,7 +333,7 @@ std::vector SALOMEDS_AttributeTableOfInteger::GetRow(int theRow) void SALOMEDS_AttributeTableOfInteger::AddColumn(const std::vector& theData) { - int aLength = theData.size(), i; + int aLength = (int)theData.size(), i; //!< TODO: conversion from size_t to int if (_isLocal) { CheckLocked(); SALOMEDS::Locker lock; @@ -355,7 +355,7 @@ void SALOMEDS_AttributeTableOfInteger::AddColumn(const std::vector& theData void SALOMEDS_AttributeTableOfInteger::SetColumn(int theColumn, const std::vector& theData) { - int aLength = theData.size(), i; + int aLength = (int)theData.size(), i; //!< TODO: conversion from size_t to int if (_isLocal) { CheckLocked(); SALOMEDS::Locker lock; diff --git a/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger_i.cxx index 8d96b9baf..54b73e0e9 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger_i.cxx @@ -84,7 +84,7 @@ void SALOMEDS_AttributeTableOfInteger_i::SetRowTitles(const SALOMEDS::StringSeq& CheckLocked(); SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); if (theTitles.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); - for (int i = 0; i < theTitles.length(); i++) { + for (int i = 0; i < (int)theTitles.length(); i++) { SetRowTitle(i + 1, theTitles[i]); } } @@ -95,7 +95,7 @@ SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfInteger_i::GetRowTitles() SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); SALOMEDS::StringSeq_var aTitles = new SALOMEDS::StringSeq; aTitles->length(aTable->GetNbRows()); - for(int i = 0; i < aTitles->length(); i++) + for(int i = 0; i < (int)aTitles->length(); i++) aTitles[i] = CORBA::string_dup(aTable->GetRowTitle(i + 1).c_str()); return aTitles._retn(); } @@ -132,7 +132,7 @@ void SALOMEDS_AttributeTableOfInteger_i::SetColumnTitles(const SALOMEDS::StringS CheckLocked(); SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); if (theTitles.length() != aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); - for (int i = 0; i < theTitles.length(); i++) { + for (int i = 0; i < (int)theTitles.length(); i++) { aTable->SetColumnTitle(i + 1, (char*)theTitles[i].in()); } } @@ -143,7 +143,7 @@ SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfInteger_i::GetColumnTitles() SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); SALOMEDS::StringSeq_var aTitles = new SALOMEDS::StringSeq; aTitles->length(aTable->GetNbColumns()); - for(int i = 0; i < aTitles->length(); i++) + for(int i = 0; i < (int)aTitles->length(); i++) aTitles[i] = CORBA::string_dup(aTable->GetColumnTitle(i + 1).c_str()); return aTitles._retn(); } @@ -180,7 +180,7 @@ void SALOMEDS_AttributeTableOfInteger_i::SetRowUnits(const SALOMEDS::StringSeq& CheckLocked(); SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); if (theUnits.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); - for (int i = 0; i < theUnits.length(); i++) { + for (int i = 0; i < (int)theUnits.length(); i++) { aTable->SetRowUnit(i + 1, (char*)theUnits[i].in()); } } @@ -191,7 +191,7 @@ SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfInteger_i::GetRowUnits() SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); SALOMEDS::StringSeq_var aUnits = new SALOMEDS::StringSeq; aUnits->length(aTable->GetNbRows()); - for(int i = 0; i < aUnits->length(); i++) + for(int i = 0; i < (int)aUnits->length(); i++) aUnits[i] = CORBA::string_dup(aTable->GetRowUnit(i + 1).c_str()); return aUnits._retn(); } @@ -217,7 +217,7 @@ void SALOMEDS_AttributeTableOfInteger_i::AddRow(const SALOMEDS::LongSeq& theData SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); std::vector aRow; - for (int i = 0; i < theData.length(); i++) aRow.push_back(theData[i]); + for (size_t i = 0; i < theData.length(); i++) aRow.push_back(theData[(_CORBA_ULong)i]); //!< TODO: conversion from size_t to _CORBA_ULong try { aTable->SetRowData(aTable->GetNbRows() + 1, aRow); } @@ -235,7 +235,7 @@ void SALOMEDS_AttributeTableOfInteger_i::SetRow(CORBA::Long theRow, const SALOME SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); std::vector aRow; - for (int i = 0; i < theData.length(); i++) aRow.push_back(theData[i]); + for (size_t i = 0; i < theData.length(); i++) aRow.push_back(theData[(_CORBA_ULong)i]); //!< TODO: conversion from size_t to _CORBA_ULong try { aTable->SetRowData(theRow, aRow); } @@ -254,7 +254,7 @@ SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfInteger_i::GetRow(CORBA::Long theRow SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq; std::vector aRow = aTable->GetRowData(theRow); - CorbaSeq->length(aRow.size()); + CorbaSeq->length((_CORBA_ULong)aRow.size()); //!< TODO: conversion from size_t to _CORBA_ULong for (int i = 0; i < aRow.size(); i++) { CorbaSeq[i] = aRow[i]; } @@ -270,7 +270,7 @@ void SALOMEDS_AttributeTableOfInteger_i::AddColumn(const SALOMEDS::LongSeq& theD SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); std::vector aColumn; - for (int i = 0; i < theData.length(); i++) aColumn.push_back(theData[i]); + for (size_t i = 0; i < theData.length(); i++) aColumn.push_back(theData[(_CORBA_ULong)i]); //!< TODO: conversion from size_t to _CORBA_ULong try { aTable->SetColumnData(aTable->GetNbColumns() + 1, aColumn); } @@ -288,7 +288,7 @@ void SALOMEDS_AttributeTableOfInteger_i::SetColumn(CORBA::Long theColumn, const SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); std::vector aColumn; - for (int i = 0; i < theData.length(); i++) aColumn.push_back(theData[i]); + for (size_t i = 0; i < theData.length(); i++) aColumn.push_back(theData[(_CORBA_ULong)i]); //!< TODO: conversion from size_t to _CORBA_ULong try { aTable->SetColumnData(theColumn, aColumn); } @@ -307,7 +307,7 @@ SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfInteger_i::GetColumn(CORBA::Long the SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq; std::vector aColumn = aTable->GetColumnData(theColumn); - CorbaSeq->length(aColumn.size()); + CorbaSeq->length((_CORBA_ULong)aColumn.size()); //!< TODO: conversion from size_t to _CORBA_ULong for (int i = 0; i < aColumn.size(); i++) { CorbaSeq[i] = aColumn[i]; } @@ -381,7 +381,7 @@ SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfInteger_i::GetRowSetIndices(CORBA::L SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq; std::vector aSeq = aTable->GetSetRowIndices(theRow); - CorbaSeq->length(aSeq.size()); + CorbaSeq->length((_CORBA_ULong)aSeq.size()); //!< TODO: conversion from size_t to _CORBA_ULong for (int i = 0; i < aSeq.size(); i++) { CorbaSeq[i] = aSeq[i]; } @@ -413,7 +413,7 @@ SALOMEDS::TMPFile* SALOMEDS_AttributeTableOfInteger_i::SaveToFile() std::string aString = aTable->Save(); char* aBuffer = (char*)CORBA::string_dup(aString.c_str()); - int aBufferSize = strlen((char*)aBuffer); + int aBufferSize = (int)strlen((char*)aBuffer); //!< TODO: conversion from size_t to int CORBA::Octet* anOctetBuf = (CORBA::Octet*)aBuffer; @@ -442,7 +442,7 @@ SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfInteger_i::SortRow(CORBA::Long theRo catch(...) { throw SALOMEDS::AttributeTable::IncorrectIndex(); } - CorbaSeq->length(aSeq.size()); + CorbaSeq->length((_CORBA_ULong)aSeq.size()); //!< TODO: conversion from size_t to _CORBA_ULong for (int i = 0; i < aSeq.size(); i++) { CorbaSeq[i] = aSeq[i]; } @@ -469,7 +469,7 @@ SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfInteger_i::SortColumn(CORBA::Long th catch(...) { throw SALOMEDS::AttributeTable::IncorrectIndex(); } - CorbaSeq->length(aSeq.size()); + CorbaSeq->length((_CORBA_ULong)aSeq.size()); //!< TODO: conversion from size_t to _CORBA_ULong for (int i = 0; i < aSeq.size(); i++) { CorbaSeq[i] = aSeq[i]; } @@ -496,7 +496,7 @@ SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfInteger_i::SortByRow(CORBA::Long the catch(...) { throw SALOMEDS::AttributeTable::IncorrectIndex(); } - CorbaSeq->length(aSeq.size()); + CorbaSeq->length((_CORBA_ULong)aSeq.size()); //!< TODO: conversion from size_t to _CORBA_ULong for (int i = 0; i < aSeq.size(); i++) { CorbaSeq[i] = aSeq[i]; } @@ -523,7 +523,7 @@ SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfInteger_i::SortByColumn(CORBA::Long catch(...) { throw SALOMEDS::AttributeTable::IncorrectIndex(); } - CorbaSeq->length(aSeq.size()); + CorbaSeq->length((_CORBA_ULong)aSeq.size()); //!< TODO: conversion from size_t to _CORBA_ULong for (int i = 0; i < aSeq.size(); i++) { CorbaSeq[i] = aSeq[i]; } diff --git a/src/SALOMEDS/SALOMEDS_AttributeTableOfReal.cxx b/src/SALOMEDS/SALOMEDS_AttributeTableOfReal.cxx index 92d14f4ff..68c8f6b25 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTableOfReal.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTableOfReal.cxx @@ -92,7 +92,7 @@ std::string SALOMEDS_AttributeTableOfReal::GetRowTitle(int theIndex) void SALOMEDS_AttributeTableOfReal::SetRowTitles(const std::vector& theTitles) { CheckLocked(); - int aLength = theTitles.size(), i; + int aLength = (int)theTitles.size(), i; //!< TODO: conversion from size_t to int if (_isLocal) { CheckLocked(); SALOMEDS::Locker lock; @@ -152,7 +152,7 @@ std::string SALOMEDS_AttributeTableOfReal::GetColumnTitle(int theIndex) void SALOMEDS_AttributeTableOfReal::SetColumnTitles(const std::vector& theTitles) { - int aLength = theTitles.size(), i; + int aLength = (int)theTitles.size(), i; //!< TODO: conversion from size_t to int if (_isLocal) { CheckLocked(); SALOMEDS::Locker lock; @@ -212,7 +212,7 @@ std::string SALOMEDS_AttributeTableOfReal::GetRowUnit(int theIndex) void SALOMEDS_AttributeTableOfReal::SetRowUnits(const std::vector& theUnits) { - int aLength = theUnits.size(), i; + int aLength = (int)theUnits.size(), i; //!< TODO: conversion from size_t to int if (_isLocal) { CheckLocked(); SALOMEDS::Locker lock; @@ -266,7 +266,7 @@ int SALOMEDS_AttributeTableOfReal::GetNbColumns() void SALOMEDS_AttributeTableOfReal::AddRow(const std::vector& theData) { - int aLength = theData.size(), i; + int aLength = (int)theData.size(), i; //!< TODO: conversion from size_t to int if (_isLocal) { CheckLocked(); SALOMEDS::Locker lock; @@ -288,7 +288,7 @@ void SALOMEDS_AttributeTableOfReal::AddRow(const std::vector& theData) void SALOMEDS_AttributeTableOfReal::SetRow(int theRow, const std::vector& theData) { - int aLength = theData.size(), i; + int aLength = (int)theData.size(), i; //!< TODO: conversion from size_t to int if (_isLocal) { CheckLocked(); SALOMEDS::Locker lock; @@ -327,7 +327,7 @@ std::vector SALOMEDS_AttributeTableOfReal::GetRow(int theRow) void SALOMEDS_AttributeTableOfReal::AddColumn(const std::vector& theData) { - int aLength = theData.size(), i; + int aLength = (int)theData.size(), i; //!< TODO: conversion from size_t to int if (_isLocal) { CheckLocked(); SALOMEDS::Locker lock; @@ -349,7 +349,7 @@ void SALOMEDS_AttributeTableOfReal::AddColumn(const std::vector& theData void SALOMEDS_AttributeTableOfReal::SetColumn(int theColumn, const std::vector& theData) { - int aLength = theData.size(), i; + int aLength = (int)theData.size(), i; //!< TODO: conversion from size_t to int if (_isLocal) { CheckLocked(); SALOMEDS::Locker lock; diff --git a/src/SALOMEDS/SALOMEDS_AttributeTableOfReal_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeTableOfReal_i.cxx index 2b9f09bef..a4d68689a 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTableOfReal_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTableOfReal_i.cxx @@ -83,7 +83,7 @@ void SALOMEDS_AttributeTableOfReal_i::SetRowTitles(const SALOMEDS::StringSeq& th CheckLocked(); SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); if (theTitles.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); - for (int i = 0; i < theTitles.length(); i++) { + for (int i = 0; i < (int)theTitles.length(); i++) { aTable->SetRowTitle(i + 1, (char*)theTitles[i].in()); } } @@ -94,7 +94,7 @@ SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfReal_i::GetRowTitles() SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); SALOMEDS::StringSeq_var aTitles = new SALOMEDS::StringSeq; aTitles->length(aTable->GetNbRows()); - for(int i = 0; i < aTitles->length(); i++) + for(int i = 0; i < (int)aTitles->length(); i++) aTitles[i] = CORBA::string_dup(aTable->GetRowTitle(i + 1).c_str()); return aTitles._retn(); } @@ -131,7 +131,7 @@ void SALOMEDS_AttributeTableOfReal_i::SetColumnTitles(const SALOMEDS::StringSeq& CheckLocked(); SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); if (theTitles.length() != aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); - for (int i = 0; i < theTitles.length(); i++) { + for (int i = 0; i < (int)theTitles.length(); i++) { aTable->SetColumnTitle(i + 1, (char*)theTitles[i].in()); } } @@ -142,7 +142,7 @@ SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfReal_i::GetColumnTitles() SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); SALOMEDS::StringSeq_var aTitles = new SALOMEDS::StringSeq; aTitles->length(aTable->GetNbColumns()); - for(int i = 0; i < aTitles->length(); i++) + for(int i = 0; i < (int)aTitles->length(); i++) aTitles[i] = CORBA::string_dup(aTable->GetColumnTitle(i + 1).c_str()); return aTitles._retn(); } @@ -179,7 +179,7 @@ void SALOMEDS_AttributeTableOfReal_i::SetRowUnits(const SALOMEDS::StringSeq& the CheckLocked(); SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); if (theUnits.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); - for (int i = 0; i < theUnits.length(); i++) { + for (int i = 0; i < (int)theUnits.length(); i++) { aTable->SetRowUnit(i + 1, (char*)theUnits[i].in()); } } @@ -190,7 +190,7 @@ SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfReal_i::GetRowUnits() SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); SALOMEDS::StringSeq_var aUnits = new SALOMEDS::StringSeq; aUnits->length(aTable->GetNbRows()); - for(int i = 0; i < aUnits->length(); i++) + for(int i = 0; i < (int)aUnits->length(); i++) aUnits[i] = CORBA::string_dup(aTable->GetRowUnit(i + 1).c_str()); return aUnits._retn(); } @@ -217,7 +217,7 @@ void SALOMEDS_AttributeTableOfReal_i::AddRow(const SALOMEDS::DoubleSeq& theData) SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); std::vector aRow; - for (int i = 0; i < theData.length(); i++) aRow.push_back(theData[i]); + for (size_t i = 0; i < theData.length(); i++) aRow.push_back(theData[(_CORBA_ULong)i]); //!< TODO: conversion from size_t to _CORBA_ULong aTable->SetRowData(aTable->GetNbRows() + 1, aRow); } @@ -230,7 +230,7 @@ void SALOMEDS_AttributeTableOfReal_i::SetRow(CORBA::Long theRow, const SALOMEDS: SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); std::vector aRow; - for (int i = 0; i < theData.length(); i++) aRow.push_back(theData[i]); + for (size_t i = 0; i < theData.length(); i++) aRow.push_back(theData[(_CORBA_ULong)i]); //!< TODO: conversion from size_t to _CORBA_ULong aTable->SetRowData(theRow, aRow); } @@ -244,7 +244,7 @@ SALOMEDS::DoubleSeq* SALOMEDS_AttributeTableOfReal_i::GetRow(CORBA::Long theRow) SALOMEDS::DoubleSeq_var CorbaSeq = new SALOMEDS::DoubleSeq; std::vector aRow = aTable->GetRowData(theRow); - CorbaSeq->length(aRow.size()); + CorbaSeq->length((_CORBA_ULong)aRow.size()); //!< TODO: conversion from size_t to _CORBA_ULong for (int i = 0; i < aRow.size(); i++) { CorbaSeq[i] = aRow[i]; } @@ -260,7 +260,7 @@ void SALOMEDS_AttributeTableOfReal_i::AddColumn(const SALOMEDS::DoubleSeq& theDa SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); std::vector aColumn; - for (int i = 0; i < theData.length(); i++) aColumn.push_back(theData[i]); + for (size_t i = 0; i < theData.length(); i++) aColumn.push_back(theData[(_CORBA_ULong)i]); //!< TODO: conversion from size_t to _CORBA_ULong aTable->SetColumnData(aTable->GetNbColumns() + 1, aColumn); } @@ -273,7 +273,7 @@ void SALOMEDS_AttributeTableOfReal_i::SetColumn(CORBA::Long theColumn, const SAL SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); std::vector aColumn; - for (int i = 0; i < theData.length(); i++) aColumn.push_back(theData[i]); + for (size_t i = 0; i < theData.length(); i++) aColumn.push_back(theData[(_CORBA_ULong)i]); //!< TODO: conversion from size_t to _CORBA_ULong aTable->SetColumnData(theColumn, aColumn); } @@ -287,7 +287,7 @@ SALOMEDS::DoubleSeq* SALOMEDS_AttributeTableOfReal_i::GetColumn(CORBA::Long theC SALOMEDS::DoubleSeq_var CorbaSeq = new SALOMEDS::DoubleSeq; std::vector aColumn = aTable->GetColumnData(theColumn); - CorbaSeq->length(aColumn.size()); + CorbaSeq->length((_CORBA_ULong)aColumn.size()); //!< TODO: conversion from size_t to _CORBA_ULong for (int i = 0; i < aColumn.size(); i++) { CorbaSeq[i] = aColumn[i]; } @@ -357,7 +357,7 @@ SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfReal_i::GetRowSetIndices(CORBA::Long SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq; std::vector aSeq = aTable->GetSetRowIndices(theRow); - int len = aSeq.size(); + int len = (int)aSeq.size(); //!< TODO: conversion from size_t to int CorbaSeq->length(len); for (int i = 0; i < len; i++) { CorbaSeq[i] = aSeq[i]; @@ -389,7 +389,7 @@ SALOMEDS::TMPFile* SALOMEDS_AttributeTableOfReal_i::SaveToFile() std::string aString = aTable->Save(); char* aBuffer = (char*)CORBA::string_dup(aString.c_str()); - int aBufferSize = strlen((char*)aBuffer); + int aBufferSize = (int)strlen((char*)aBuffer); //!< TODO: conversion from size_t to int CORBA::Octet* anOctetBuf = (CORBA::Octet*)aBuffer; @@ -418,7 +418,7 @@ SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfReal_i::SortRow(CORBA::Long theRow, catch(...) { throw SALOMEDS::AttributeTable::IncorrectIndex(); } - CorbaSeq->length(aSeq.size()); + CorbaSeq->length((_CORBA_ULong)aSeq.size()); //!< TODO: conversion from size_t to _CORBA_ULong for (int i = 0; i < aSeq.size(); i++) { CorbaSeq[i] = aSeq[i]; } @@ -445,7 +445,7 @@ SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfReal_i::SortColumn(CORBA::Long theCo catch(...) { throw SALOMEDS::AttributeTable::IncorrectIndex(); } - CorbaSeq->length(aSeq.size()); + CorbaSeq->length((_CORBA_ULong)aSeq.size()); //!< TODO: conversion from size_t to _CORBA_ULong for (int i = 0; i < aSeq.size(); i++) { CorbaSeq[i] = aSeq[i]; } @@ -472,7 +472,7 @@ SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfReal_i::SortByRow(CORBA::Long theRow catch(...) { throw SALOMEDS::AttributeTable::IncorrectIndex(); } - CorbaSeq->length(aSeq.size()); + CorbaSeq->length((_CORBA_ULong)aSeq.size()); //!< TODO: conversion from size_t to _CORBA_ULong for (int i = 0; i < aSeq.size(); i++) { CorbaSeq[i] = aSeq[i]; } @@ -499,7 +499,7 @@ SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfReal_i::SortByColumn(CORBA::Long the catch(...) { throw SALOMEDS::AttributeTable::IncorrectIndex(); } - CorbaSeq->length(aSeq.size()); + CorbaSeq->length((_CORBA_ULong)aSeq.size()); //!< TODO: conversion from size_t to _CORBA_ULong for (int i = 0; i < aSeq.size(); i++) { CorbaSeq[i] = aSeq[i]; } diff --git a/src/SALOMEDS/SALOMEDS_AttributeTableOfString.cxx b/src/SALOMEDS/SALOMEDS_AttributeTableOfString.cxx index 2bbe433b4..5bbd9f622 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTableOfString.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTableOfString.cxx @@ -94,7 +94,7 @@ std::string SALOMEDS_AttributeTableOfString::GetRowTitle(int theIndex) void SALOMEDS_AttributeTableOfString::SetRowTitles(const std::vector& theTitles) { - int aLength = theTitles.size(), i; + int aLength = (int)theTitles.size(), i; //!< TODO: conversion from size_t to int if (_isLocal) { CheckLocked(); SALOMEDS::Locker lock; @@ -154,7 +154,7 @@ std::string SALOMEDS_AttributeTableOfString::GetColumnTitle(int theIndex) void SALOMEDS_AttributeTableOfString::SetColumnTitles(const std::vector& theTitles) { - int aLength = theTitles.size(), i; + int aLength = (int)theTitles.size(), i; //!< TODO: conversion from size_t to int if (_isLocal) { CheckLocked(); SALOMEDS::Locker lock; @@ -214,7 +214,7 @@ std::string SALOMEDS_AttributeTableOfString::GetRowUnit(int theIndex) void SALOMEDS_AttributeTableOfString::SetRowUnits(const std::vector& theUnits) { - int aLength = theUnits.size(), i; + int aLength = (int)theUnits.size(), i; //!< TODO: conversion from size_t to int if (_isLocal) { CheckLocked(); SALOMEDS::Locker lock; @@ -268,7 +268,7 @@ int SALOMEDS_AttributeTableOfString::GetNbColumns() void SALOMEDS_AttributeTableOfString::AddRow(const std::vector& theData) { - int aLength = theData.size(), i; + int aLength = (int)theData.size(), i; //!< TODO: conversion from size_t to int if (_isLocal) { CheckLocked(); SALOMEDS::Locker lock; @@ -290,7 +290,7 @@ void SALOMEDS_AttributeTableOfString::AddRow(const std::vector& the void SALOMEDS_AttributeTableOfString::SetRow(int theRow, const std::vector& theData) { - int aLength = theData.size(), i; + int aLength = (int)theData.size(), i; //!< TODO: conversion from size_t to int if (_isLocal) { CheckLocked(); SALOMEDS::Locker lock; @@ -329,7 +329,7 @@ std::vector SALOMEDS_AttributeTableOfString::GetRow(int theRow) void SALOMEDS_AttributeTableOfString::AddColumn(const std::vector& theData) { - int aLength = theData.size(), i; + int aLength = (int)theData.size(), i; //!< TODO: conversion from size_t to int if (_isLocal) { CheckLocked(); SALOMEDS::Locker lock; @@ -351,7 +351,7 @@ void SALOMEDS_AttributeTableOfString::AddColumn(const std::vector& void SALOMEDS_AttributeTableOfString::SetColumn(int theColumn, const std::vector& theData) { - int aLength = theData.size(), i; + int aLength = (int)theData.size(), i; //!< TODO: conversion from size_t to int if (_isLocal) { CheckLocked(); SALOMEDS::Locker lock; diff --git a/src/SALOMEDS/SALOMEDS_AttributeTableOfString_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeTableOfString_i.cxx index 998914d7d..75781aeb9 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTableOfString_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTableOfString_i.cxx @@ -85,7 +85,7 @@ void SALOMEDS_AttributeTableOfString_i::SetRowTitles(const SALOMEDS::StringSeq& CheckLocked(); SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); if (theTitles.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); - for (int i = 0; i < theTitles.length(); i++) { + for (int i = 0; i < (int)theTitles.length(); i++) { aTable->SetRowTitle(i + 1, std::string((char*)theTitles[i].in())); } } @@ -96,7 +96,7 @@ SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfString_i::GetRowTitles() SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); SALOMEDS::StringSeq_var aTitles = new SALOMEDS::StringSeq; aTitles->length(aTable->GetNbRows()); - for(int i = 0; i < aTitles->length(); i++) + for(int i = 0; i < (int)aTitles->length(); i++) aTitles[i] =CORBA::string_dup(aTable->GetRowTitle(i + 1).c_str()); return aTitles._retn(); } @@ -132,7 +132,7 @@ void SALOMEDS_AttributeTableOfString_i::SetColumnTitles(const SALOMEDS::StringSe CheckLocked(); SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); if (theTitles.length() != aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); - for (int i = 0; i < theTitles.length(); i++) { + for (int i = 0; i < (int)theTitles.length(); i++) { aTable->SetColumnTitle(i + 1, std::string((char*)theTitles[i].in())); } } @@ -143,7 +143,7 @@ SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfString_i::GetColumnTitles() SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); SALOMEDS::StringSeq_var aTitles = new SALOMEDS::StringSeq; aTitles->length(aTable->GetNbColumns()); - for(int i = 0; i < aTitles->length(); i++) + for(int i = 0; i < (int)aTitles->length(); i++) aTitles[i] = CORBA::string_dup(aTable->GetColumnTitle(i + 1).c_str()); return aTitles._retn(); } @@ -180,7 +180,7 @@ void SALOMEDS_AttributeTableOfString_i::SetRowUnits(const SALOMEDS::StringSeq& t CheckLocked(); SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); if (theUnits.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); - for (int i = 0; i < theUnits.length(); i++) { + for (int i = 0; i < (int)theUnits.length(); i++) { aTable->SetRowUnit(i + 1, std::string((char*)theUnits[i].in())); } } @@ -191,7 +191,7 @@ SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfString_i::GetRowUnits() SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); SALOMEDS::StringSeq_var aUnits = new SALOMEDS::StringSeq; aUnits->length(aTable->GetNbRows()); - for(int i = 0; i < aUnits->length(); i++) + for(int i = 0; i < (int)aUnits->length(); i++) aUnits[i] = CORBA::string_dup(aTable->GetRowUnit(i + 1).c_str()); return aUnits._retn(); } @@ -218,7 +218,7 @@ void SALOMEDS_AttributeTableOfString_i::AddRow(const SALOMEDS::StringSeq& theDat SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); std::vector aRow; - for (int i = 0; i < theData.length(); i++) aRow.push_back(std::string(CORBA::string_dup(theData[i]))); + for (size_t i = 0; i < theData.length(); i++) aRow.push_back(std::string(CORBA::string_dup(theData[(_CORBA_ULong)i]))); //!< TODO: conversion from size_t to _CORBA_ULong aTable->SetRowData(aTable->GetNbRows() + 1, aRow); } @@ -231,7 +231,7 @@ void SALOMEDS_AttributeTableOfString_i::SetRow(CORBA::Long theRow, const SALOMED SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); std::vector aRow; - for (int i = 0; i < theData.length(); i++) aRow.push_back(std::string(CORBA::string_dup(theData[i].in()))); + for (size_t i = 0; i < theData.length(); i++) aRow.push_back(std::string(CORBA::string_dup(theData[(_CORBA_ULong)i].in()))); //!< TODO: conversion from size_t to _CORBA_ULong aTable->SetRowData(theRow, aRow); } @@ -245,7 +245,7 @@ SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfString_i::GetRow(CORBA::Long theRo SALOMEDS::StringSeq_var CorbaSeq = new SALOMEDS::StringSeq; std::vector aRow = aTable->GetRowData(theRow); - CorbaSeq->length(aRow.size()); + CorbaSeq->length((_CORBA_ULong)aRow.size()); //!< TODO: conversion from size_t to _CORBA_ULong for (int i = 0; i < aRow.size(); i++) { CorbaSeq[i] = CORBA::string_dup(aRow[i].c_str()); } @@ -261,7 +261,7 @@ void SALOMEDS_AttributeTableOfString_i::AddColumn(const SALOMEDS::StringSeq& the SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); std::vector aColumn; - for (int i = 0; i < theData.length(); i++) aColumn.push_back(std::string(CORBA::string_dup(theData[i]))); + for (size_t i = 0; i < theData.length(); i++) aColumn.push_back(std::string(CORBA::string_dup(theData[(_CORBA_ULong)i]))); //!< TODO: conversion from size_t to _CORBA_ULong aTable->SetColumnData(aTable->GetNbColumns() + 1, aColumn); } @@ -274,7 +274,7 @@ void SALOMEDS_AttributeTableOfString_i::SetColumn(CORBA::Long theColumn, const S SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); std::vector aColumn; - for (int i = 0; i < theData.length(); i++) aColumn.push_back(std::string(CORBA::string_dup(theData[i]))); + for (size_t i = 0; i < theData.length(); i++) aColumn.push_back(std::string(CORBA::string_dup(theData[(_CORBA_ULong)i]))); //!< TODO: conversion from size_t to _CORBA_ULong aTable->SetColumnData(theColumn, aColumn); } @@ -288,7 +288,7 @@ SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfString_i::GetColumn(CORBA::Long th SALOMEDS::StringSeq_var CorbaSeq = new SALOMEDS::StringSeq; std::vector aColumn = aTable->GetColumnData(theColumn); - CorbaSeq->length(aColumn.size()); + CorbaSeq->length((_CORBA_ULong)aColumn.size()); //!< TODO: conversion from size_t to _CORBA_ULong for (int i = 0; i < aColumn.size(); i++) { CorbaSeq[i] = CORBA::string_dup(aColumn[i].c_str()); } @@ -358,7 +358,7 @@ SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfString_i::GetRowSetIndices(CORBA::Lo SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq; std::vector aSeq = aTable->GetSetRowIndices(theRow); - CorbaSeq->length(aSeq.size()); + CorbaSeq->length((_CORBA_ULong)aSeq.size()); //!< TODO: conversion from size_t to _CORBA_ULong for (int i = 0; i < aSeq.size(); i++) { CorbaSeq[i] = aSeq[i]; } @@ -389,7 +389,7 @@ SALOMEDS::TMPFile* SALOMEDS_AttributeTableOfString_i::SaveToFile() std::string aString = aTable->Save(); char* aBuffer = (char*)CORBA::string_dup(aString.c_str()); - int aBufferSize = strlen((char*)aBuffer); + int aBufferSize = (int)strlen((char*)aBuffer); //!< TODO: conversion from size_t to int CORBA::Octet* anOctetBuf = (CORBA::Octet*)aBuffer; @@ -418,7 +418,7 @@ SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfString_i::SortRow(CORBA::Long theRow catch(...) { throw SALOMEDS::AttributeTable::IncorrectIndex(); } - CorbaSeq->length(aSeq.size()); + CorbaSeq->length((_CORBA_ULong)aSeq.size()); //!< TODO: conversion from size_t to _CORBA_ULong for (int i = 0; i < aSeq.size(); i++) { CorbaSeq[i] = aSeq[i]; } @@ -445,7 +445,7 @@ SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfString_i::SortColumn(CORBA::Long the catch(...) { throw SALOMEDS::AttributeTable::IncorrectIndex(); } - CorbaSeq->length(aSeq.size()); + CorbaSeq->length((_CORBA_ULong)aSeq.size()); //!< TODO: conversion from size_t to _CORBA_ULong for (int i = 0; i < aSeq.size(); i++) { CorbaSeq[i] = aSeq[i]; } @@ -472,7 +472,7 @@ SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfString_i::SortByRow(CORBA::Long theR catch(...) { throw SALOMEDS::AttributeTable::IncorrectIndex(); } - CorbaSeq->length(aSeq.size()); + CorbaSeq->length((_CORBA_ULong)aSeq.size()); //!< TODO: conversion from size_t to _CORBA_ULong for (int i = 0; i < aSeq.size(); i++) { CorbaSeq[i] = aSeq[i]; } @@ -499,7 +499,7 @@ SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfString_i::SortByColumn(CORBA::Long t catch(...) { throw SALOMEDS::AttributeTable::IncorrectIndex(); } - CorbaSeq->length(aSeq.size()); + CorbaSeq->length((_CORBA_ULong)aSeq.size()); //!< TODO: conversion from size_t to _CORBA_ULong for (int i = 0; i < aSeq.size(); i++) { CorbaSeq[i] = aSeq[i]; } diff --git a/src/SALOMEDS/SALOMEDS_AttributeTarget.cxx b/src/SALOMEDS/SALOMEDS_AttributeTarget.cxx index 445964264..4252164f0 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTarget.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTarget.cxx @@ -61,7 +61,7 @@ std::vector<_PTR(SObject)> SALOMEDS_AttributeTarget::Get() if (_isLocal) { SALOMEDS::Locker lock; std::vector aSeq = dynamic_cast(_local_impl)->Get(); - aLength = aSeq.size(); + aLength = (int)aSeq.size(); //!< TODO: conversion from size_t to int for (i = 0; i < aLength; i++) { aSO = new SALOMEDS_SObject(aSeq[i]); aVector.push_back(_PTR(SObject)(aSO)); diff --git a/src/SALOMEDS/SALOMEDS_AttributeTarget_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeTarget_i.cxx index b0c4cf956..cc765ddd1 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTarget_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTarget_i.cxx @@ -44,7 +44,7 @@ SALOMEDS::Study::ListOfSObject* SALOMEDS_AttributeTarget_i::Get() SALOMEDS::Locker lock; std::vector aSeq = dynamic_cast(_impl)->Get(); SALOMEDS::Study::ListOfSObject_var aSList = new SALOMEDS::Study::ListOfSObject; - int aLength = aSeq.size(), i; + int aLength = (int)aSeq.size(), i; //!< TODO: conversion from size_t to int if (aLength == 0) return aSList._retn(); aSList->length(aLength); for(i=0; i Save(sco.in(), url, isMultiFile); SALOMEDSImpl_TMPFile* aTMPFile = new SALOMEDS_TMPFile_i(aStream._retn()); - theStreamLength = aTMPFile->Size(); + theStreamLength = (long)aTMPFile->Size(); //!< TODO: conversion from size_t to long sco->UnRegister(); SALOMEDS::lock(); @@ -103,7 +103,7 @@ SALOMEDSImpl_TMPFile* SALOMEDS_Driver_i::SaveASCII(const SALOMEDSImpl_SComponent aStream = _driver->SaveASCII(sco.in(), url, isMultiFile); SALOMEDSImpl_TMPFile* aTMPFile = new SALOMEDS_TMPFile_i(aStream._retn()); - theStreamLength = aTMPFile->Size(); + theStreamLength = (long)aTMPFile->Size(); //!< TODO: conversion from size_t to long sco->UnRegister(); SALOMEDS::lock(); @@ -272,7 +272,7 @@ SALOMEDSImpl_TMPFile* SALOMEDS_Driver_i::CopyFrom(const SALOMEDSImpl_SObject& th aStream = _driver->CopyFrom(so.in(), anObjectID); SALOMEDSImpl_TMPFile* aTMPFile = new SALOMEDS_TMPFile_i(aStream._retn()); - theStreamLength = aTMPFile->Size(); + theStreamLength = (long)aTMPFile->Size(); //!< TODO: conversion from size_t to long theObjectID = anObjectID; so->UnRegister(); @@ -336,7 +336,7 @@ SALOMEDSImpl_TMPFile* SALOMEDS_Driver_i::DumpPython(bool isPublished, aStream = _engine->DumpPython(isPublished, isMultiFile, aValidScript); SALOMEDSImpl_TMPFile* aTMPFile = new Engines_TMPFile_i(aStream._retn()); - theStreamLength = aTMPFile->Size(); + theStreamLength = (long)aTMPFile->Size(); //!< TODO: conversion from size_t to long isValidScript = aValidScript; SALOMEDS::lock(); diff --git a/src/SALOMEDS/SALOMEDS_IParameters.cxx b/src/SALOMEDS/SALOMEDS_IParameters.cxx index ac7860999..47455cf1b 100644 --- a/src/SALOMEDS/SALOMEDS_IParameters.cxx +++ b/src/SALOMEDS/SALOMEDS_IParameters.cxx @@ -70,7 +70,7 @@ int SALOMEDS_IParameters::append(const std::string& listName, const std::string& v = _ap->GetStrArray(listName); v.push_back(value); _ap->SetStrArray(listName, v); - return (v.size()-1); + return (int)(v.size()-1); //!< TODO: conversion from size_t to int } int SALOMEDS_IParameters::nbValues(const std::string& listName) @@ -78,7 +78,7 @@ int SALOMEDS_IParameters::nbValues(const std::string& listName) if(!_ap) return -1; if(!_ap->IsSet(listName, PT_STRARRAY)) return 0; std::vector v = _ap->GetStrArray(listName); - return v.size(); + return (int)v.size(); //!< TODO: conversion from size_t to int } std::vector SALOMEDS_IParameters::getValues(const std::string& listName) @@ -126,7 +126,7 @@ std::string SALOMEDS_IParameters::getParameter(const std::string& entry, const s if(!_ap) return ""; if(!_ap->IsSet(entry, PT_STRARRAY)) return ""; std::vector v = _ap->GetStrArray(entry); - int length = v.size(); + int length = (int)v.size(); //!< TODO: conversion from size_t to int for(int i = 0; i SALOMEDS_IParameters::getAllParameterNames(const std::s if(!_ap) return v; if(!_ap->IsSet(entry, PT_STRARRAY)) return v; v = _ap->GetStrArray(entry); - int length = v.size(); + int length = (int)v.size(); //!< TODO: conversion from size_t to int for(int i = 0; iIsSet(entry, PT_STRARRAY)) return ""; std::vector v = _ap->GetStrArray(entry); - int length = v.size(); + int length = (int)v.size(); //!< TODO: conversion from size_t to int for(int i = 0; i SALOMEDS_IParameters::getAllParameterValues(const std:: if(!_ap) return v; if(!_ap->IsSet(entry, PT_STRARRAY)) return v; v = _ap->GetStrArray(entry); - int length = v.size(); + int length = (int)v.size(); //!< TODO: conversion from size_t to int for(int i = 1; iIsSet(entry, PT_STRARRAY)) return -1; - return _ap->GetStrArray(entry).size()/2; + return (int)(_ap->GetStrArray(entry).size()/2); //!< TODO: conversion from size_t to int } std::vector SALOMEDS_IParameters::getEntries() @@ -232,8 +232,8 @@ std::vector SALOMEDS_IParameters::parseValue(const std::string& val std::string val(value); std::vector v; int pos; - if(fromEnd) pos = val.rfind(separator); - else pos = val.find(separator); + if(fromEnd) pos = (int)val.rfind(separator); //!< TODO: conversion from size_t to int + else pos = (int)val.find(separator); //!< TODO: conversion from size_t to int if(pos < 0) { v.push_back(value); @@ -258,7 +258,7 @@ std::string SALOMEDS_IParameters::encodeEntry(const std::string& entry, const st std::string SALOMEDS_IParameters::decodeEntry(const std::string& entry) { - int pos = entry.rfind("_"); + int pos = (int)entry.rfind("_"); //!< TODO: conversion from size_t to int if(pos < 0 || pos >= entry.length()) return entry; std::string compName(entry, 0, pos), compID, tail(entry, pos+1, entry.length()-1); diff --git a/src/SALOMEDS/SALOMEDS_SObject.cxx b/src/SALOMEDS/SALOMEDS_SObject.cxx index 7fd582966..3858a9e55 100644 --- a/src/SALOMEDS/SALOMEDS_SObject.cxx +++ b/src/SALOMEDS/SALOMEDS_SObject.cxx @@ -226,7 +226,7 @@ std::vector<_PTR(GenericAttribute)> SALOMEDS_SObject::GetAllAttributes() if (_isLocal) { SALOMEDS::Locker lock; std::vector aSeq = _local_impl->GetAllAttributes(); - aLength = aSeq.size(); + aLength = (int)aSeq.size(); //!< TODO: conversion from size_t to int for (int i = 0; i < aLength; i++) { anAttr = SALOMEDS_GenericAttribute::CreateAttribute(dynamic_cast(aSeq[i])); aVector.push_back(_PTR(GenericAttribute)(anAttr)); diff --git a/src/SALOMEDS/SALOMEDS_SObject_i.cxx b/src/SALOMEDS/SALOMEDS_SObject_i.cxx index 129e42547..05d5a38fa 100644 --- a/src/SALOMEDS/SALOMEDS_SObject_i.cxx +++ b/src/SALOMEDS/SALOMEDS_SObject_i.cxx @@ -178,7 +178,7 @@ SALOMEDS::ListOfAttributes* SALOMEDS_SObject_i::GetAllAttributes() SALOMEDS::Locker lock; std::vector aSeq = _impl->GetAllAttributes(); SALOMEDS::ListOfAttributes_var SeqOfAttr = new SALOMEDS::ListOfAttributes; - int length = aSeq.size(); + int length = (int)aSeq.size(); //!< TODO: conversion from size_t to int SeqOfAttr->length(length); @@ -258,7 +258,7 @@ void SALOMEDS_SObject_i::Name(const char* name) CORBA::Short SALOMEDS_SObject_i::Tag() { SALOMEDS::Locker lock; - return _impl->Tag(); + return (CORBA::Short)_impl->Tag(); //!< TODO: conversion from int to CORBA::Short } //============================================================================ @@ -280,7 +280,7 @@ CORBA::Short SALOMEDS_SObject_i::GetLastChildTag() CORBA::Short SALOMEDS_SObject_i::Depth() { SALOMEDS::Locker lock; - return _impl->Depth(); + return (CORBA::Short)_impl->Depth(); //!< TODO: conversion from int to CORBA::Short } //============================================================================ diff --git a/src/SALOMEDS/SALOMEDS_Study.cxx b/src/SALOMEDS/SALOMEDS_Study.cxx index e22fc9dee..82b6b50d2 100644 --- a/src/SALOMEDS/SALOMEDS_Study.cxx +++ b/src/SALOMEDS/SALOMEDS_Study.cxx @@ -353,7 +353,7 @@ std::vector<_PTR(SObject)> SALOMEDS_Study::FindObjectByName(const std::string& a SALOMEDS::Locker lock; std::vector aSeq = _local_impl->FindObjectByName(anObjectName, aComponentName); - aLength = aSeq.size(); + aLength = (int)aSeq.size(); //!< TODO: conversion from size_t to int for (i = 0; i< aLength; i++) aVector.push_back(_PTR(SObject)(new SALOMEDS_SObject(aSeq[i]))); } @@ -594,7 +594,7 @@ std::vector<_PTR(SObject)> SALOMEDS_Study::FindDependances(const _PTR(SObject)& std::vector aSeq = _local_impl->FindDependances(*(aSO->GetLocalImpl())); if (aSeq.size()) { - aLength = aSeq.size(); + aLength = (int)aSeq.size(); //!< TODO: conversion from size_t to int for (i = 0; i < aLength; i++) aVector.push_back(_PTR(SObject)(new SALOMEDS_SObject(aSeq[i]))); } diff --git a/src/SALOMEDS/SALOMEDS_Study_i.cxx b/src/SALOMEDS/SALOMEDS_Study_i.cxx index bc2f0785b..f027c5313 100644 --- a/src/SALOMEDS/SALOMEDS_Study_i.cxx +++ b/src/SALOMEDS/SALOMEDS_Study_i.cxx @@ -730,7 +730,7 @@ SALOMEDS::Study::ListOfSObject* SALOMEDS_Study_i::FindObjectByName( const char* std::string((char*)aComponentName)); SALOMEDS::Study::ListOfSObject_var listSO = new SALOMEDS::Study::ListOfSObject; - int aLength = aSeq.size(); + int aLength = (int)aSeq.size(); //!< TODO: conversion from size_t to int listSO->length(aLength); for (int i = 0; i < aLength; i++) { SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New(aSeq[i], _orb); @@ -1047,7 +1047,7 @@ SALOMEDS::ListOfDates* SALOMEDS_Study_i::GetModificationsDate() std::vector aSeq = _impl->GetModificationsDate(); - int aLength = aSeq.size(); + int aLength = (int)aSeq.size(); //!< TODO: conversion from size_t to int aDates->length(aLength); for (int anIndex = 0; anIndex < aLength; anIndex++) { aDates[anIndex] = CORBA::string_dup(aSeq[anIndex].c_str()); @@ -1265,7 +1265,7 @@ SALOMEDS::ListOfStrings* SALOMEDS_Study_i::GetLockerID() std::vector aSeq = _impl->GetLockerID(); - int aLength = aSeq.size(); + int aLength = (int)aSeq.size(); //!< TODO: conversion from size_t to int aResult->length(aLength); for(int anIndex = 0; anIndex < aLength; anIndex++) { aResult[anIndex] = CORBA::string_dup(aSeq[anIndex].c_str()); @@ -1492,7 +1492,7 @@ SALOMEDS::ListOfStrings* SALOMEDS_Study_i::GetVariableNames() std::vector aVarNames = _impl->GetVariableNames(); - int aLen = aVarNames.size(); + int aLen = (int)aVarNames.size(); //!< TODO: conversion from size_t to int aResult->length(aLen); for (int anInd = 0; anInd < aLen; anInd++) aResult[anInd] = CORBA::string_dup(aVarNames[anInd].c_str()); @@ -1562,7 +1562,7 @@ SALOMEDS::ListOfListOfStrings* SALOMEDS_Study_i::ParseVariables(const char* theV std::vector< std::vector > aSections = _impl->ParseVariables(std::string(theVarName)); - int aSectionsLen = aSections.size(); + int aSectionsLen = (int)aSections.size(); //!< TODO: conversion from size_t to int aResult->length(aSectionsLen); for (int aSectionInd = 0; aSectionInd < aSectionsLen; aSectionInd++) { @@ -1570,7 +1570,7 @@ SALOMEDS::ListOfListOfStrings* SALOMEDS_Study_i::ParseVariables(const char* theV SALOMEDS::ListOfStrings_var aList = new SALOMEDS::ListOfStrings; - int aLen = aVarNames.size(); + int aLen = (int)aVarNames.size(); //!< TODO: conversion from size_t to int aList->length(aLen); for (int anInd = 0; anInd < aLen; anInd++) diff --git a/src/SALOMEDS/SALOMEDS_TMPFile_i.cxx b/src/SALOMEDS/SALOMEDS_TMPFile_i.cxx index 0d5b711db..e0bbb4ce7 100644 --- a/src/SALOMEDS/SALOMEDS_TMPFile_i.cxx +++ b/src/SALOMEDS/SALOMEDS_TMPFile_i.cxx @@ -54,7 +54,7 @@ SALOMEDS_TMPFile_i if(theIndex < 0 || theIndex >= myStream->length()) throw std::out_of_range("SALOMEDS_TMPFile_i::Get(size_t) const - theIndex < 0 || theIndex >= myStream->length()"); - return myStream[theIndex]; + return myStream[(_CORBA_ULong)theIndex]; //!< TODO: conversion from size_t to _CORBA_ULong } @@ -84,5 +84,5 @@ Engines_TMPFile_i if(theIndex < 0 || theIndex >= myStream->length()) throw std::out_of_range("Engines_TMPFile_i::Get(size_t) const - theIndex < 0 || theIndex >= myStream->length()"); - return myStream[theIndex]; + return myStream[(_CORBA_ULong)theIndex]; //!< TODO: conversion from size_t to _CROBA_ULong } diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeGraphic.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeGraphic.cxx index e23121e0a..cc8d3da8d 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeGraphic.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeGraphic.cxx @@ -67,7 +67,7 @@ SALOMEDSImpl_AttributeGraphic::~SALOMEDSImpl_AttributeGraphic() void SALOMEDSImpl_AttributeGraphic::SetVisibility(const int theViewId, const bool theValue ) { - if ( myVisibility.find( theViewId ) != myVisibility.end() && myVisibility[theViewId] == theValue ) + if ( myVisibility.find( theViewId ) != myVisibility.end() && ((bool)myVisibility[theViewId] == theValue) ) //!< TODO: comparing int and bool variables return; Backup(); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx index 39dc043ea..c6d270da3 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx @@ -36,7 +36,7 @@ // of the character (2 characters) std::string convertString(const std::string& S) { - int length = S.size(); + size_t length = S.size(); if ( length == 0 ) return "0"; char c[3], *buffer = new char[length*3+1]; @@ -57,7 +57,7 @@ std::string convertString(const std::string& S) //Restors a string converted by the function convertString std::string restoreString(const std::string& S) { - int length = S.size(); + size_t length = S.size(); if ( length == 1 ) return ""; char c[3], *buffer = new char[length/3+1]; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributePythonObject.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributePythonObject.cxx index 58066fd25..387f40854 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributePythonObject.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributePythonObject.cxx @@ -71,7 +71,7 @@ bool SALOMEDSImpl_AttributePythonObject::IsScript() const int SALOMEDSImpl_AttributePythonObject::GetLength() const { - return mySequence.size(); + return (int)mySequence.size(); //!< TODO: conversion from size_t to int } const std::string& SALOMEDSImpl_AttributePythonObject::ID() const diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.cxx index 3d8467802..9703eeddd 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.cxx @@ -284,7 +284,7 @@ std::string SALOMEDSImpl_AttributeStudyProperties::Save() (int)(aMonths[anIndex]), (int)(aYears[anIndex]), (char*)(aNames[anIndex].c_str())); - a = strlen(aProperty); + a = (int)strlen(aProperty); //!< TODO: conversion from size_t to int aProperty[a++] = 1; } @@ -294,7 +294,7 @@ std::string SALOMEDSImpl_AttributeStudyProperties::Save() //Write units if need if(units.size() > 0) { sprintf(&(aProperty[a]),"%s",units.c_str()); - a = strlen(aProperty); + a = (int)strlen(aProperty); //!< TODO: conversion from size_t to int } aProperty[a++] = 1; //delimiter of the units and comments @@ -302,7 +302,7 @@ std::string SALOMEDSImpl_AttributeStudyProperties::Save() //Write comments if need if(comment.size() > 0) { sprintf(&(aProperty[a]),"%s",comment.c_str()); - a = strlen(aProperty); + a = (int)strlen(aProperty); //!< TODO: conversion from size_t to int } aProperty[a++] = 30; //delimiter of the component versions @@ -312,7 +312,7 @@ std::string SALOMEDSImpl_AttributeStudyProperties::Save() sprintf(&(aProperty[a]),"%s=%s", (char*)(versionsIt->first.c_str()), (char*)(versionsIt->second.c_str())); - a = strlen(aProperty); + a = (int)strlen(aProperty); //!< TODO: conversion from size_t to int aProperty[a++] = 1; } @@ -499,11 +499,11 @@ void SALOMEDSImpl_AttributeStudyProperties::Load(const std::string& value) aVersions[verSize] = 0; std::string mVersions = aVersions; - int start = 0, idx = mVersions.find( ';', start ); + int start = 0, idx = (int)mVersions.find( ';', start ); //!< TODO: conversion from size_t to int while ( idx != std::string::npos ) { SetComponentVersion( aModule, mVersions.substr( start, idx-start ) ); start = idx + 1; - idx = mVersions.find( ';', start ); + idx = (int)mVersions.find( ';', start ); //!< TODO: conversion from size_t to int } SetComponentVersion( aModule, mVersions.substr( start ) ); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.cxx index 4792c0a82..f4e406068 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.cxx @@ -127,7 +127,7 @@ void SALOMEDSImpl_AttributeTableOfInteger::SetRowData(const int theRow, size_t i, aShift = (theRow-1)*myNbColumns, aLength = theData.size(); for(i = 1; i <= aLength; i++) { - myTable[aShift + i] = theData[i-1]; + myTable[(int)(aShift + i)] = theData[i-1]; //!< TODO: conversion from size_t to int } if(theRow > myNbRows) myNbRows = theRow; @@ -182,7 +182,7 @@ void SALOMEDSImpl_AttributeTableOfInteger::SetRowUnits(const std::vector myNbRows) { - myNbRows = aLength; + myNbRows = (int)aLength; //!< TODO: conversion from size_t to int while (myRows.size() < myNbRows) { // append empty row titles myRows.push_back(std::string("")); } @@ -449,7 +449,7 @@ std::string SALOMEDSImpl_AttributeTableOfInteger::Save() //Title l = myTitle.size(); - sprintf(buffer, "%d\n", l); + sprintf(buffer, "%Iu\n", l); aString+=buffer; for(i=0; ifirst, p->second); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.cxx index c564d154a..229394e6a 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.cxx @@ -124,7 +124,7 @@ void SALOMEDSImpl_AttributeTableOfReal::SetRowData(const int theRow, size_t i, aShift = (theRow-1)*myNbColumns, aLength = theData.size(); for(i = 1; i <= aLength; i++) { - myTable[aShift + i] = theData[i-1]; + myTable[(int)(aShift + i)] = theData[i-1]; //!< TODO: conversion from size_t to int } if(theRow > myNbRows) myNbRows = theRow; @@ -179,7 +179,7 @@ void SALOMEDSImpl_AttributeTableOfReal::SetRowUnits(const std::vector myNbRows) { - myNbRows = aLength; + myNbRows = (int)aLength; //!< TODO: conversion from size_t to int while (myRows.size() < myNbRows) { // append empty row titles myRows.push_back(std::string("")); } @@ -447,7 +447,7 @@ std::string SALOMEDSImpl_AttributeTableOfReal::Save() //Title l = myTitle.size(); - sprintf(buffer, "%d\n", l); + sprintf(buffer, "%Iu\n", l); aString+=buffer; for(i=0; ifirst, p->second); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.cxx index 9e88504dd..269d8614d 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.cxx @@ -132,7 +132,7 @@ void SALOMEDSImpl_AttributeTableOfString::SetRowUnits(const std::vector SALOMEDSImpl_AttributeTableOfString::GetRowUnits() @@ -147,7 +147,7 @@ void SALOMEDSImpl_AttributeTableOfString::SetRowTitles(const std::vector myNbRows) myNbRows = theRow; @@ -230,11 +230,11 @@ void SALOMEDSImpl_AttributeTableOfString::SetColumnData(const int theColumn, size_t i, aLength = theData.size(); for(i = 1; i <= aLength; i++) { - myTable[myNbColumns*(i-1)+theColumn] = theData[i-1]; + myTable[myNbColumns*((int)i-1)+theColumn] = theData[i-1]; //!< TODO: conversion from size_t to int } if(aLength > myNbRows) { - myNbRows = aLength; + myNbRows = (int)aLength; //!< TODO: conversion from size_t to int while (myRows.size() < myNbRows) { // append empty row titles myRows.push_back(std::string("")); } @@ -446,7 +446,7 @@ std::string SALOMEDSImpl_AttributeTableOfString::Save() //Title l = myTitle.size(); - sprintf(buffer, "%d\n", l); + sprintf(buffer, "%Iu\n", l); aString+=buffer; for(i=0; isecond.size()) { // check empty string in the value table diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTreeNode.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTreeNode.cxx index 1c1120812..f280575fd 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTreeNode.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTreeNode.cxx @@ -464,7 +464,7 @@ std::string SALOMEDSImpl_AttributeTreeNode::Save() if (HasFirst()) aFirst = GetFirst()->Label().Entry(); else aFirst = "!"; int aLength = 4; - aLength += aFather.size() + aPrevious.size() + aNext.size() + aFirst.size(); + aLength += (int)(aFather.size() + aPrevious.size() + aNext.size() + aFirst.size()); //!< TODO: conversion from size_t to int char* aResult = new char[aLength]; sprintf(aResult, "%s %s %s %s", aFather.c_str(), aPrevious.c_str(), aNext.c_str(), aFirst.c_str()); std::string ret(aResult); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.cxx index eefd74b92..4f2281d82 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.cxx @@ -62,7 +62,7 @@ int SALOMEDSImpl_IParameters::append(const std::string& listName, const std::str v = _ap->GetStrArray(listName); v.push_back(value); _ap->SetStrArray(listName, v); - return (v.size()-1); + return (int)(v.size()-1); //!< TODO: conversion from size_t to int } int SALOMEDSImpl_IParameters::nbValues(const std::string& listName) @@ -70,7 +70,7 @@ int SALOMEDSImpl_IParameters::nbValues(const std::string& listName) if(!_ap) return -1; if(!_ap->IsSet(listName, PT_STRARRAY)) return 0; std::vector v = _ap->GetStrArray(listName); - return v.size(); + return (int)v.size(); //!< TODO: conversion from size_t to int } std::vector SALOMEDSImpl_IParameters::getValues(const std::string& listName) @@ -118,7 +118,7 @@ std::string SALOMEDSImpl_IParameters::getParameter(const std::string& entry, con if(!_ap) return ""; if(!_ap->IsSet(entry, PT_STRARRAY)) return ""; std::vector v = _ap->GetStrArray(entry); - int length = v.size(); + size_t length = v.size(); for(int i = 0; iIsSet(entry, PT_STRARRAY)) return ""; std::vector v = _ap->GetStrArray(entry); - int length = v.size(); + size_t length = v.size(); for(int i = 0; i SALOMEDSImpl_IParameters::getAllParameterNames(const st if(!_ap) return v; if(!_ap->IsSet(entry, PT_STRARRAY)) return v; v = _ap->GetStrArray(entry); - int length = v.size(); + size_t length = v.size(); for(int i = 0; i SALOMEDSImpl_IParameters::getAllParameterValues(const s if(!_ap) return v; if(!_ap->IsSet(entry, PT_STRARRAY)) return v; v = _ap->GetStrArray(entry); - int length = v.size(); + size_t length = v.size(); for(int i = 1; iIsSet(entry, PT_STRARRAY)) return -1; - return _ap->GetStrArray(entry).size()/2; + return int(_ap->GetStrArray(entry).size()/2); //!< TODO: conversion from size_t to int } std::vector SALOMEDSImpl_IParameters::getEntries() @@ -220,7 +220,7 @@ std::vector SALOMEDSImpl_IParameters::getProperties() std::string SALOMEDSImpl_IParameters::decodeEntry(const std::string& entry) { - int pos = entry.rfind("_"); + size_t pos = entry.rfind("_"); if(pos < 0 || pos >= entry.size()) return entry; std::string compName(entry, 0, pos), compID, tail(entry, pos+1, entry.length()-1); @@ -382,7 +382,7 @@ std::string SALOMEDSImpl_IParameters::getDefaultScript(SALOMEDSImpl_Study* study if(!onlyId) { dump += shift + "# set up entry " + v[i] +" ("+so_name+")" + " parameters" + "\n"; if(hasId) { - int idIndex = std::distance(names.begin(), it); + int idIndex = (int)std::distance(names.begin(), it); //!< TODO: conversion from __int64 to int dump += shift + "objId = " + values[idIndex] + "\n"; } diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_SObject.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_SObject.cxx index 933a4ea45..9ab083688 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_SObject.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_SObject.cxx @@ -151,7 +151,7 @@ bool SALOMEDSImpl_SObject::FindAttribute(DF_Attribute*& theAttribute, std::vector SALOMEDSImpl_SObject::GetAllAttributes() const { std::vector va1, va = _lab.GetAttributes(); - for(int i = 0, len = va.size(); i(va[i]); if(ga && ga->Type() != std::string("AttributeReference")) va1.push_back(va[i]); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_ScalarVariable.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_ScalarVariable.cxx index bc7d3976f..3045397de 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_ScalarVariable.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_ScalarVariable.cxx @@ -198,7 +198,7 @@ void SALOMEDSImpl_ScalarVariable::Load(const std::string& theStrValue) } else { #ifdef OLDSTUDY_COMPATIBILITY - int dotpos = strCopy.find(','); + size_t dotpos = strCopy.find(','); if (dotpos != std::string::npos) strCopy.replace(dotpos, 1, "."); #endif // OLDSTUDY_COMPATIBILITY diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx index 7e2283971..c03b98786 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx @@ -374,7 +374,7 @@ bool SALOMEDSImpl_Study::Impl_SaveProperties(HDFgroup *hdf_group) int aLength = 0, aLength1 = 0, anIndex, i, unitsSize = 0, commentSize = 0; for(i=1; i<=aNames.size(); i++) - aLength += aNames[i-1].size() + 1; + aLength += (int)aNames[i-1].size() + 1; //!< TODO: conversion from size_t to int std::map< std::string, std::vector >::const_iterator it; for (it = allVersions.begin(); it != allVersions.end(); ++it ) { @@ -386,11 +386,11 @@ bool SALOMEDSImpl_Study::Impl_SaveProperties(HDFgroup *hdf_group) vlist += *vlit; } versions[ it->first ] = vlist; - aLength1 += it->first.size() + vlist.size() + 2; + aLength1 += int(it->first.size() + vlist.size() + 2); //!< TODO: conversion from size_t to int } - unitsSize = units.size(); - commentSize = comment.size(); + unitsSize = (int)units.size(); //!< TODO: conversion from size_t to int + commentSize = (int)comment.size(); //!< TODO: conversion from size_t to int //string format: //locked flag, modified flag, @@ -413,7 +413,7 @@ bool SALOMEDSImpl_Study::Impl_SaveProperties(HDFgroup *hdf_group) sprintf(aProperty,"%c%c", (char)aProp->GetCreationMode(), (aProp->IsLocked())?'l':'u'); - aLength = aNames.size(); + aLength = (int)aNames.size(); //!< TODO: conversion from size_t to int int a = 2; for(anIndex = 0; anIndex 0) { sprintf(&(aProperty[a]),"%s",units.c_str()); - a = strlen(aProperty); + a = (int)strlen(aProperty); //!< TODO: conversion from size_t to int } aProperty[a++] = 1; @@ -441,7 +441,7 @@ bool SALOMEDSImpl_Study::Impl_SaveProperties(HDFgroup *hdf_group) //Write comments if need if(comment.size() > 0) { sprintf(&(aProperty[a]),"%s",comment.c_str()); - a = strlen(aProperty); + a = (int)strlen(aProperty); //!< TODO: conversion from size_t to int } aProperty[a++] = 30; //delimiter of the component versions @@ -451,7 +451,7 @@ bool SALOMEDSImpl_Study::Impl_SaveProperties(HDFgroup *hdf_group) sprintf(&(aProperty[a]),"%s=%s", (char*)(versionsIt->first.c_str()), (char*)(versionsIt->second.c_str())); - a = a + versionsIt->first.size() + versionsIt->second.size() + 1; + a = a + (int)versionsIt->first.size() + (int)versionsIt->second.size() + 1; //!< TODO: conversion from size_t to int aProperty[a++] = 1; } @@ -957,7 +957,7 @@ bool SALOMEDSImpl_Study::CopyLabel(SALOMEDSImpl_Driver* theEngine, } // iterate attributes std::vector attrList = theSource.GetAttributes(); - for(int i = 0, len = attrList.size(); iCanPaste(aCompName, anObjID->Value())) { std::string aTMPStr = aNameAttribute->Value(); - int aLen = aTMPStr.size(); + int aLen = (int)aTMPStr.size(); //!< TODO: conversion from size_t to int unsigned char* aStream = NULL; if(aLen > 0) { aStream = new unsigned char[aLen+10]; @@ -1149,7 +1149,7 @@ DF_Label SALOMEDSImpl_Study::PasteLabel(SALOMEDSImpl_Driver* theEngine, // iterate attributes std::vector attrList = theSource.GetAttributes(); - for(int i = 0, len = attrList.size(); iID())) { aTargetLabel.ForgetAttribute(anAttr->ID()); @@ -1476,7 +1476,7 @@ SALOMEDSImpl_SObject SALOMEDSImpl_Study::FindObjectByPath(const std::string& the std::string aPath(thePath), aToken; SALOMEDSImpl_SObject aSO; - int aLength = aPath.size(); + int aLength = (int)aPath.size(); //!< TODO: conversion from size_t to int bool isRelative = false; if(aLength == 0) { //Empty path - return the current context @@ -1501,7 +1501,7 @@ SALOMEDSImpl_SObject SALOMEDSImpl_Study::FindObjectByPath(const std::string& the } std::vector vs = SALOMEDSImpl_Tool::splitString(aPath, '/'); - for(int i = 0, len = vs.size(); i aMinutes, aHours, aDays, aMonths, aYears; aProp->GetModifications(aNames, aMinutes, aHours, aDays, aMonths, aYears); - int aLastIndex = aNames.size()-1; + int aLastIndex = (int)aNames.size()-1; //!< TODO: conversion from size_t to int char aResult[20]; sprintf(aResult, "%2.2d/%2.2d/%4.4d %2.2d:%2.2d", (int)(aDays[aLastIndex]),(int)(aMonths[aLastIndex]), (int)(aYears[aLastIndex]), @@ -1942,7 +1942,7 @@ std::vector SALOMEDSImpl_Study::GetModificationsDate() std::vector aMinutes, aHours, aDays, aMonths, aYears; aProp->GetModifications(aNames, aMinutes, aHours, aDays, aMonths, aYears); - int anIndex, aLength = aNames.size(); + int anIndex, aLength = (int)aNames.size(); //!< TODO: conversion from size_t to int std::vector aDates; for (anIndex = 1; anIndex < aLength; anIndex++) { @@ -2193,7 +2193,7 @@ bool SALOMEDSImpl_Study::DumpStudy(const std::string& thePath, // dump all components and create the components specific scripts bool isOk = true; - int aLength = aSeq.size(); + int aLength = (int)aSeq.size(); //!< TODO: conversion from size_t to int for(int i = 1; i <= aLength; i++) { std::string aCompType = aSeq[i-1]; @@ -2532,7 +2532,7 @@ bool SALOMEDSImpl_Study::IsStudyLocked() void SALOMEDSImpl_Study::UnLockStudy(const char* theLockerID) { std::vector::iterator vsI = _lockers.begin(); - int length = _lockers.size(); + int length = (int)_lockers.size(); //!< TODO: conversion from size_t to int bool isFound = false; std::string id(theLockerID); for(int i = 0; iValue(); std::vector< std::vector > aSections = ParseVariables( aString ); - for( int i = 0, n = aSections.size(); i < n; i++ ) + for( int i = 0, n = (int)aSections.size(); i < n; i++ ) //!< TODO: conversion from size_t to int { std::vector aVector = aSections[i]; - for( int j = 0, m = aVector.size(); j < m; j++ ) + for( int j = 0, m = (int)aVector.size(); j < m; j++ ) //!< TODO: conversion from size_t to int { std::string aStr = aVector[j]; if( aStr.compare( theName ) == 0 ) @@ -2875,10 +2875,10 @@ void SALOMEDSImpl_Study::ReplaceVariableAttribute(SALOMEDSImpl_StudyBuilder* the std::string aNewString, aCurrentString = aStringAttr->Value(); std::vector< std::vector > aSections = ParseVariables( aCurrentString ); - for( int i = 0, n = aSections.size(); i < n; i++ ) + for( int i = 0, n = (int)aSections.size(); i < n; i++ ) //!< TODO: conversion from size_t to int { std::vector aVector = aSections[i]; - for( int j = 0, m = aVector.size(); j < m; j++ ) + for( int j = 0, m = (int)aVector.size(); j < m; j++ ) //!< TODO: conversion from size_t to int { std::string aStr = aVector[j]; if( aStr.compare( theSource ) == 0 ) @@ -3067,7 +3067,7 @@ static void SaveAttributes(const SALOMEDSImpl_SObject& aSO, HDFgroup *hdf_group_ hdf_size size[1]; std::vector attrList = aSO.GetLabel().GetAttributes(); DF_Attribute* anAttr = NULL; - for(int i = 0, len = attrList.size(); i 0 ) { aResult = (ASCIIfileState[0]=='A')? - aDriver->LoadASCII(anSCO, aStreamFile, aStreamSize, aDir.c_str(), aMultifileState[0]=='M'): - aDriver->Load(anSCO, aStreamFile, aStreamSize, aDir.c_str(), aMultifileState[0]=='M'); + aDriver->LoadASCII(anSCO, aStreamFile, (long)aStreamSize, aDir.c_str(), aMultifileState[0]=='M'): //!< TODO: conversion from size_t to const long + aDriver->Load(anSCO, aStreamFile, (long)aStreamSize, aDir.c_str(), aMultifileState[0]=='M'); //!< TODO: conversion from size_t to const long } if(aStreamFile != NULL) delete []aStreamFile; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.cxx index 06aa3ec1a..f46495393 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.cxx @@ -173,7 +173,7 @@ bool SALOMEDSImpl_UseCaseBuilder::Remove(const SALOMEDSImpl_SObject& theObject) for(; aChildItr.More(); aChildItr.Next()) aList.push_back(aChildItr.Value()); - for(int i = 0, len = aList.size(); iLabel() == aCurrent) { //The current node is removed aRef->Set(_root->Label()); //Reset the current node to the root } diff --git a/src/TOOLSDS/SALOMEDS_Tool.cxx b/src/TOOLSDS/SALOMEDS_Tool.cxx index 9a0db6e2c..42d61a929 100644 --- a/src/TOOLSDS/SALOMEDS_Tool.cxx +++ b/src/TOOLSDS/SALOMEDS_Tool.cxx @@ -127,7 +127,7 @@ void SALOMEDS_Tool::RemoveTemporaryFiles(const std::string& theDirectory, { std::string aDirName = theDirectory; - int i, aLength = theFiles.size(); + size_t i, aLength = theFiles.size(); for(i=1; i<=aLength; i++) { std::string aFile(aDirName); aFile += theFiles[i-1]; @@ -174,7 +174,7 @@ namespace const std::vector& theFileNames, const int theNamesOnly) { - int i, aLength = theFiles.size(); + int i, aLength = (int)theFiles.size(); //!< TODO: conversion from size_t to int if(aLength == 0) return (new SALOMEDS::TMPFile); @@ -207,10 +207,10 @@ namespace std::ifstream aFile(aFullPath.c_str()); #endif aFile.seekg(0, std::ios::end); - aFileSize[i] = aFile.tellg(); + aFileSize[i] = (long)aFile.tellg(); //!< TODO: conversion from std::streamoff to long aBufferSize += aFileSize[i]; //Add a space to store the file } - aFileNameSize[i] = theFileNames[i].length()+1; + aFileNameSize[i] = (int)theFileNames[i].length()+1; //!< TODO: conversion from size_t to int aBufferSize += aFileNameSize[i]; //Add a space to store the file name aBufferSize += (theNamesOnly)?4:12; //Add 4 bytes: a length of the file name, // 8 bytes: length of the file itself @@ -340,7 +340,7 @@ SALOMEDS_Tool::PutStreamToFiles(const SALOMEDS::TMPFile& theStream, //Put a file name to aFileName memcpy(aFileName, (aBuffer + aCurrentPos), aFileNameSize); #ifdef WIN32 - for (int i = 0; i < strlen(aFileName); i++) + for (i = 0; i < strlen(aFileName); i++) { if (aFileName[i] == ':') aFileName[i] = '_'; @@ -382,7 +382,7 @@ std::string SALOMEDS_Tool::GetNameFromPath(const std::string& thePath) { if (thePath.empty()) return ""; std::string aPath = thePath; bool isFound = false; - int pos = aPath.rfind('/'); + size_t pos = aPath.rfind('/'); if(pos > 0) { aPath = aPath.substr(pos+1, aPath.size()); isFound = true; @@ -412,7 +412,7 @@ std::string SALOMEDS_Tool::GetNameFromPath(const std::string& thePath) { std::string SALOMEDS_Tool::GetDirFromPath(const std::string& thePath) { if (thePath.empty()) return ""; - int pos = thePath.rfind('/'); + size_t pos = thePath.rfind('/'); std::string path; if(pos > 0) { path = thePath.substr(0, pos+1); @@ -433,7 +433,7 @@ std::string SALOMEDS_Tool::GetDirFromPath(const std::string& thePath) { if(path.size() == 2 && path[1] == ':') path +='\\'; #endif - for(int i = 0, len = path.size(); i