Salome HOME
#18963 Minimize compiler warnings
[modules/smesh.git] / src / StdMeshers / StdMeshers_Arithmetic1D.cxx
index 2642dd1af0db6b91a7af20c067dfc6bb5a3c51e9..8112c14772d8018abbc1ecc1ac543f86809a9338 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2020  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -20,7 +20,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_Arithmetic1D.cxx
 //  Author : Damien COQUERET, OCC
 //  Module : SMESH
@@ -48,8 +48,8 @@ using namespace std;
  */
 //=============================================================================
 
-StdMeshers_Arithmetic1D::StdMeshers_Arithmetic1D(int hypId, int studyId, SMESH_Gen * gen)
-  :SMESH_Hypothesis(hypId, studyId, gen)
+StdMeshers_Arithmetic1D::StdMeshers_Arithmetic1D(int hypId, SMESH_Gen * gen)
+  :StdMeshers_Reversible1D(hypId, gen)
 {
   _begLength = 1.;
   _endLength = 10.;
@@ -74,7 +74,6 @@ StdMeshers_Arithmetic1D::~StdMeshers_Arithmetic1D()
 //=============================================================================
 
 void StdMeshers_Arithmetic1D::SetLength(double length, bool isStartLength)
-     throw(SALOME_Exception)
 {
   if ( (isStartLength ? _begLength : _endLength) != length ) {
     if (length <= 0)
@@ -105,21 +104,6 @@ double StdMeshers_Arithmetic1D::GetLength(bool isStartLength) const
  */
 //=============================================================================
 
-void StdMeshers_Arithmetic1D::SetReversedEdges( std::vector<int>& ids )
-{
-  if ( ids != _edgeIDs ) {
-    _edgeIDs = ids;
-
-    NotifySubMeshesHypothesisModification();
-  }
-}
-
-//=============================================================================
-/*!
- *  
- */
-//=============================================================================
-
 ostream & StdMeshers_Arithmetic1D::SaveTo(ostream & save)
 {
   int listSize = _edgeIDs.size();
@@ -144,49 +128,27 @@ istream & StdMeshers_Arithmetic1D::LoadFrom(istream & load)
 {
   bool isOK = true;
   int intVal;
-  isOK = (load >> _begLength);
+  isOK = static_cast<bool>(load >> _begLength);
   if (!isOK)
     load.clear(ios::badbit | load.rdstate());
-  isOK = (load >> _endLength);
+  isOK = static_cast<bool>(load >> _endLength);
 
   if (!isOK)
     load.clear(ios::badbit | load.rdstate());
 
-  isOK = (load >> intVal);
+  isOK = static_cast<bool>(load >> intVal);
   if (isOK && intVal > 0) {
     _edgeIDs.reserve( intVal );
     for ( size_t i = 0; i < _edgeIDs.capacity() && isOK; i++) {
-      isOK = (load >> intVal);
+      isOK = static_cast<bool>(load >> intVal);
       if ( isOK ) _edgeIDs.push_back( intVal );
     }
-    isOK = (load >> _objEntry);
+    isOK = static_cast<bool>(load >> _objEntry);
   }
 
   return load;
 }
 
-//=============================================================================
-/*!
- *
- */
-//=============================================================================
-
-ostream & operator <<(ostream & save, StdMeshers_Arithmetic1D & hyp)
-{
-  return hyp.SaveTo( save );
-}
-
-//=============================================================================
-/*!
- *  
- */
-//=============================================================================
-
-istream & operator >>(istream & load, StdMeshers_Arithmetic1D & hyp)
-{
-  return hyp.LoadFrom( load );
-}
-
 //================================================================================
 /*!
  * \brief Initialize start and end length by the mesh built on the geometry