Salome HOME
Copyright update 2022
[modules/smesh.git] / src / StdMeshers / StdMeshers_FixedPoints1D.cxx
index 87f2e471e444a7d73a4dd0ca9dc704efd19365ef..c1a0afb36e9e7c7bbf2c1f2d696ffd2d7f6d80d1 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2020  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2022  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
@@ -61,23 +61,27 @@ StdMeshers_FixedPoints1D::~StdMeshers_FixedPoints1D()
 //=============================================================================
 
 void StdMeshers_FixedPoints1D::SetPoints(const std::vector<double>& listParams)
-  throw(SALOME_Exception)
 {
-  _params = listParams;
-  NotifySubMeshesHypothesisModification();
+  if ( _params != listParams )
+  {
+    _params = listParams;
+    NotifySubMeshesHypothesisModification();
+  }
 }
 
 //=============================================================================
 /*!
- *  
+ *
  */
 //=============================================================================
 
-void StdMeshers_FixedPoints1D::SetNbSegments(const std::vector<int>& listNbSeg) 
-  throw(SALOME_Exception)
+void StdMeshers_FixedPoints1D::SetNbSegments(const std::vector<smIdType>& listNbSeg)
 {
-  _nbsegs = listNbSeg;
-  NotifySubMeshesHypothesisModification();
+  if ( _nbsegs != listNbSeg )
+  {
+    _nbsegs = listNbSeg;
+    NotifySubMeshesHypothesisModification();
+  }
 }
 
 ostream & StdMeshers_FixedPoints1D::SaveTo(ostream & save)
@@ -115,7 +119,7 @@ ostream & StdMeshers_FixedPoints1D::SaveTo(ostream & save)
 istream & StdMeshers_FixedPoints1D::LoadFrom(istream & load)
 {
   bool isOK = true;
-  int intVal;
+  smIdType intVal;
   double dblVal;
 
   isOK = static_cast<bool>(load >> intVal);
@@ -180,7 +184,7 @@ bool StdMeshers_FixedPoints1D::SetParametersByMesh(const SMESH_Mesh*   theMesh,
  */
 //================================================================================
 
-bool StdMeshers_FixedPoints1D::SetParametersByDefaults(const TDefaults&  dflts,
+bool StdMeshers_FixedPoints1D::SetParametersByDefaults(const TDefaults&  /*dflts*/,
                                                        const SMESH_Mesh* /*mesh*/)
 {
   _nbsegs.reserve( 1 );