X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_FixedPoints1D.cxx;h=b5934045b4fa19d3558f49faca6e0ac3453548dd;hp=ba1f7e2d3e30f47e08956d2b91c56774b3b2db0e;hb=7a3ecab720cc517ace17c5c4677fd3c20c0051ee;hpb=6bac08c1a81f34d3f21c550bd92f83654b2546a5 diff --git a/src/StdMeshers/StdMeshers_FixedPoints1D.cxx b/src/StdMeshers/StdMeshers_FixedPoints1D.cxx index ba1f7e2d3..b5934045b 100644 --- a/src/StdMeshers/StdMeshers_FixedPoints1D.cxx +++ b/src/StdMeshers/StdMeshers_FixedPoints1D.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -17,7 +17,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH : implementaion of SMESH idl descriptions +// SMESH SMESH : implementation of SMESH idl descriptions // File : StdMeshers_FixedPoints1D.cxx // Author : Damien COQUERET, OCC // Module : SMESH @@ -27,16 +27,6 @@ #include "SMESH_Algo.hxx" #include "SMESH_Mesh.hxx" -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include - using namespace std; //============================================================================= @@ -45,19 +35,19 @@ using namespace std; */ //============================================================================= -StdMeshers_FixedPoints1D::StdMeshers_FixedPoints1D(int hypId, int studyId, +StdMeshers_FixedPoints1D::StdMeshers_FixedPoints1D(int hypId, SMESH_Gen * gen) - :SMESH_Hypothesis(hypId, studyId, gen) + :SMESH_Hypothesis(hypId, gen) { _name = "FixedPoints1D"; - _param_algo_dim = 1; + _param_algo_dim = 1; _nbsegs.reserve( 1 ); _nbsegs.push_back( 1 ); } //============================================================================= /*! - * + * */ //============================================================================= @@ -72,7 +62,7 @@ StdMeshers_FixedPoints1D::~StdMeshers_FixedPoints1D() //============================================================================= void StdMeshers_FixedPoints1D::SetPoints(std::vector& listParams) - throw(SALOME_Exception) + throw(SALOME_Exception) { _params = listParams; NotifySubMeshesHypothesisModification(); @@ -85,7 +75,7 @@ void StdMeshers_FixedPoints1D::SetPoints(std::vector& listParams) //============================================================================= void StdMeshers_FixedPoints1D::SetNbSegments(std::vector& listNbSeg) - throw(SALOME_Exception) + throw(SALOME_Exception) { _nbsegs = listNbSeg; NotifySubMeshesHypothesisModification(); @@ -140,7 +130,7 @@ ostream & StdMeshers_FixedPoints1D::SaveTo(ostream & save) //============================================================================= /*! - * + * */ //============================================================================= @@ -150,63 +140,41 @@ istream & StdMeshers_FixedPoints1D::LoadFrom(istream & load) int intVal; double dblVal; - isOK = (load >> intVal); + isOK = static_cast(load >> intVal); if (isOK && intVal > 0) { _params.clear(); _params.reserve( intVal ); - for (int i = 0; i < _params.capacity() && isOK; i++) { - isOK = (load >> dblVal); + for ( size_t i = 0; i < _params.capacity() && isOK; i++) { + isOK = static_cast(load >> dblVal); if ( isOK ) _params.push_back( dblVal ); } } - isOK = (load >> intVal); + isOK = static_cast(load >> intVal); if (isOK && intVal > 0) { _nbsegs.clear(); _nbsegs.reserve( intVal ); - for (int i = 0; i < _nbsegs.capacity() && isOK; i++) { - isOK = (load >> intVal); + for ( size_t i = 0; i < _nbsegs.capacity() && isOK; i++) { + isOK = static_cast(load >> intVal); if ( isOK ) _nbsegs.push_back( intVal ); } } - isOK = (load >> intVal); + isOK = static_cast(load >> intVal); if (isOK && intVal > 0) { _edgeIDs.clear(); _edgeIDs.reserve( intVal ); - for (int i = 0; i < _edgeIDs.capacity() && isOK; i++) { - isOK = (load >> intVal); + for ( size_t i = 0; i < _edgeIDs.capacity() && isOK; i++) { + isOK = static_cast(load >> intVal); if ( isOK ) _edgeIDs.push_back( intVal ); } } - isOK = (load >> _objEntry); + isOK = static_cast(load >> _objEntry); return load; } -//============================================================================= -/*! - * - */ -//============================================================================= - -ostream & operator <<(ostream & save, StdMeshers_FixedPoints1D & hyp) -{ - return hyp.SaveTo( save ); -} - -//============================================================================= -/*! - * - */ -//============================================================================= - -istream & operator >>(istream & load, StdMeshers_FixedPoints1D & hyp) -{ - return hyp.LoadFrom( load ); -} - //================================================================================ /*! * \brief Initialize start and end length by the mesh built on the geometry