From: eap Date: Mon, 15 Feb 2016 14:21:37 +0000 (+0300) Subject: remove "using namespace std" from SMESH headers X-Git-Tag: V8_0_0rc2^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5924952c10514e4eb2864b08764cd1571bddb1c3;p=plugins%2Fhexoticplugin.git remove "using namespace std" from SMESH headers --- diff --git a/src/GUI/HexoticPluginGUI_HypothesisCreator.cxx b/src/GUI/HexoticPluginGUI_HypothesisCreator.cxx index 2d3e8f6..f32312e 100644 --- a/src/GUI/HexoticPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/HexoticPluginGUI_HypothesisCreator.cxx @@ -263,7 +263,7 @@ QFrame* HexoticPluginGUI_HypothesisCreator::buildFrame() } else { - myVLWidget->labelFacesWithLayers->setVisible(false); + myVLWidget->labelFacesWithLayers->setVisible(false); myVLWidget->myFacesWithLayers->setVisible(false); myVLWidget->labelImprintedFaces->setVisible(false); myVLWidget->myImprintedFaces->setVisible(false); @@ -294,7 +294,7 @@ QFrame* HexoticPluginGUI_HypothesisCreator::buildFrame() void HexoticPluginGUI_HypothesisCreator::onAddLocalSize() { int rowCount = mySmpWidget->tableWidget->rowCount(); - int columnCount = mySmpWidget->tableWidget->columnCount(); + //int columnCount = mySmpWidget->tableWidget->columnCount(); // Get the selected object properties GEOM::GEOM_Object_var sizeMapObject = myGeomSelWdg->GetObject< GEOM::GEOM_Object >(0); @@ -488,13 +488,13 @@ void HexoticPluginGUI_HypothesisCreator::retrieveParams() const std::vector vector = data.myFacesWithLayers; SMESH::long_array_var aVec = new SMESH::long_array; aVec->length(vector.size()); - for (int i = 0; i < vector.size(); i++) + for (size_t i = 0; i < vector.size(); i++) aVec[i]=vector.at(i); myVLWidget->myFacesWithLayers->SetListOfIDs(aVec); vector = data.myImprintedFaces; aVec = new SMESH::long_array; aVec->length(vector.size()); - for (int i = 0; i < vector.size(); i++) + for (size_t i = 0; i < vector.size(); i++) aVec[i]=vector.at(i); myVLWidget->myImprintedFaces->SetListOfIDs(aVec); @@ -581,7 +581,7 @@ bool HexoticPluginGUI_HypothesisCreator::readParamsFromHypo( HexoticHypothesisDa // Size maps HexoticPlugin::HexoticPluginSizeMapsList_var sizeMaps = h->GetSizeMaps(); - for ( int i = 0 ; i < sizeMaps->length() ; i++) + for ( CORBA::ULong i = 0 ; i < sizeMaps->length() ; i++) { HexoticPlugin::HexoticPluginSizeMap aSizeMap = sizeMaps[i]; std::string entry = CORBA::string_dup(aSizeMap.entry.in()); @@ -596,10 +596,10 @@ bool HexoticPluginGUI_HypothesisCreator::readParamsFromHypo( HexoticHypothesisDa h_data.myDirection = h->GetDirection(); h_data.myGrowth = h->GetGrowth(); SMESH::long_array_var vector = h->GetFacesWithLayers(); - for (int i = 0; i < vector->length(); i++) + for ( CORBA::ULong i = 0; i < vector->length(); i++) h_data.myFacesWithLayers.push_back(vector[i]); vector = h->GetImprintedFaces(); - for (int i = 0; i < vector->length(); i++) + for ( CORBA::ULong i = 0; i < vector->length(); i++) h_data.myImprintedFaces.push_back(vector[i]); return true; @@ -653,14 +653,14 @@ bool HexoticPluginGUI_HypothesisCreator::storeParamsToHypo( const HexoticHypothe std::vector vector = h_data.myFacesWithLayers; SMESH::long_array_var aVec = new SMESH::long_array; aVec->length(vector.size()); - for (int i = 0; i < vector.size(); i++) + for ( size_t i = 0; i < vector.size(); i++) aVec[i]=vector.at(i); h->SetFacesWithLayers( aVec ); vector = h_data.myImprintedFaces; aVec = new SMESH::long_array; aVec->length(vector.size()); - for (int i = 0; i < vector.size(); i++) + for ( size_t i = 0; i < vector.size(); i++) aVec[i]=vector.at(i); h->SetImprintedFaces( aVec ); } @@ -703,10 +703,10 @@ bool HexoticPluginGUI_HypothesisCreator::readParamsFromWidgets( HexoticHypothesi h_data.myDirection = myVLWidget->myDirection->currentIndex() == 0 ? true : false; h_data.myGrowth = myVLWidget->myGrowth->text().isEmpty() ? 0.0 : myVLWidget->myGrowth->value(); SMESH::long_array_var ids = myVLWidget->myFacesWithLayers->GetListOfIDs(); - for (int i = 0; i < ids->length(); i++) + for ( CORBA::ULong i = 0; i < ids->length(); i++) h_data.myFacesWithLayers.push_back( ids[i] ); ids = myVLWidget->myImprintedFaces->GetListOfIDs(); - for (int i = 0; i < ids->length(); i++) + for ( CORBA::ULong i = 0; i < ids->length(); i++) h_data.myImprintedFaces.push_back( ids[i] ); printData(h_data); diff --git a/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx b/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx index 8bd090d..73ef7d1 100644 --- a/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx +++ b/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx @@ -1468,7 +1468,7 @@ bool HexoticPlugin_Hexotic::Compute(SMESH_Mesh& aMesh, // to prevent from displaying error message after computing, // SetIsAlwaysComputed( true ) to empty sub-meshes - vector< SMESH_subMesh* > subMeshesAlwaysComp; + std::vector< SMESH_subMesh* > subMeshesAlwaysComp; for ( int i = 0; i < _nbShape; ++i ) if ( SMESH_subMesh* sm = aMesh.GetSubMeshContaining( aShape )) { diff --git a/src/HexoticPlugin/HexoticPlugin_Hypothesis_i.cxx b/src/HexoticPlugin/HexoticPlugin_Hypothesis_i.cxx index a02028d..7f68397 100644 --- a/src/HexoticPlugin/HexoticPlugin_Hypothesis_i.cxx +++ b/src/HexoticPlugin/HexoticPlugin_Hypothesis_i.cxx @@ -172,8 +172,8 @@ void HexoticPlugin_Hypothesis_i::SetHexoticWorkingDirectory(const char* path) th THROW_SALOME_CORBA_EXCEPTION( "Null working directory",SALOME::BAD_PARAM ); ASSERT(myBaseImpl); - string file(path); - string oldValue(GetHexoticWorkingDirectory()); + std::string file(path); + std::string oldValue(GetHexoticWorkingDirectory()); bool doDump = false; if (oldValue != file) doDump = true; @@ -226,7 +226,7 @@ void HexoticPlugin_Hypothesis_i::SetTextOptions(const char* theOptions) { // MESSAGE("HexoticPlugin_Hypothesis_i::SetTextOptions"); ASSERT(myBaseImpl); - string oldValue(GetTextOptions()); + std::string oldValue(GetTextOptions()); this->GetImpl()->SetTextOptions(theOptions); if (theOptions != oldValue) SMESH::TPythonDump() << _this() << ".SetTextOptions( '" << theOptions << "' )"; @@ -234,7 +234,7 @@ void HexoticPlugin_Hypothesis_i::SetTextOptions(const char* theOptions) HexoticPlugin::HexoticPluginSizeMapsList* HexoticPlugin_Hypothesis_i::GetSizeMaps () { - // Get the std::map < string entry, double size > + // Get the std::map < std::string entry, double size > HexoticPlugin::HexoticPluginSizeMapsList_var result = new HexoticPlugin::HexoticPluginSizeMapsList(); const ::HexoticPlugin_Hypothesis::THexoticSizeMaps sizeMaps = this->GetImpl()->GetSizeMaps(); result->length( sizeMaps.size() ); @@ -326,7 +326,7 @@ void HexoticPlugin_Hypothesis_i::SetGrowth(CORBA::Double theVal) void HexoticPlugin_Hypothesis_i::SetFacesWithLayers(const ::SMESH::long_array& theVal) { // MESSAGE("HexoticPlugin_Hypothesis_i::SetFacesWithLayers"); - vector ids( theVal.length() ); + std::vector ids( theVal.length() ); for ( unsigned i = 0; i < ids.size(); ++i ) ids[i] = theVal[i]; @@ -338,7 +338,7 @@ void HexoticPlugin_Hypothesis_i::SetFacesWithLayers(const ::SMESH::long_array& t void HexoticPlugin_Hypothesis_i::SetImprintedFaces(const ::SMESH::long_array& theVal) { // MESSAGE("HexoticPlugin_Hypothesis_i::SetImprintedFaces"); - vector ids( theVal.length() ); + std::vector ids( theVal.length() ); for ( unsigned i = 0; i < ids.size(); ++i ) ids[i] = theVal[i];