Salome HOME
bos #20256: [CEA 18523] Porting SMESH to int 64 bits
[modules/smesh.git] / src / StdMeshers / StdMeshers_FixedPoints1D.cxx
index 81759f9110f0431437cacbf0082a085e38855afe..71c23b2b581442f0f8fe421db06fb951eb9daf4b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2019  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021  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
@@ -60,24 +60,28 @@ StdMeshers_FixedPoints1D::~StdMeshers_FixedPoints1D()
  */
 //=============================================================================
 
-void StdMeshers_FixedPoints1D::SetPoints(std::vector<double>& listParams)
-  throw(SALOME_Exception)
+void StdMeshers_FixedPoints1D::SetPoints(const std::vector<double>& listParams)
 {
-  _params = listParams;
-  NotifySubMeshesHypothesisModification();
+  if ( _params != listParams )
+  {
+    _params = listParams;
+    NotifySubMeshesHypothesisModification();
+  }
 }
 
 //=============================================================================
 /*!
- *  
+ *
  */
 //=============================================================================
 
-void StdMeshers_FixedPoints1D::SetNbSegments(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 );