From: eap Date: Tue, 16 Feb 2010 09:32:14 +0000 (+0000) Subject: fix Save() and Load() X-Git-Tag: V5_1_4a1~82 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ae8e36cc4a3a54c225dd0363e9eeb2c37f574496;p=modules%2Fsmesh.git fix Save() and Load() --- diff --git a/src/StdMeshers/StdMeshers_FixedPoints1D.cxx b/src/StdMeshers/StdMeshers_FixedPoints1D.cxx index cd163c09b..c3d60f4c4 100644 --- a/src/StdMeshers/StdMeshers_FixedPoints1D.cxx +++ b/src/StdMeshers/StdMeshers_FixedPoints1D.cxx @@ -123,13 +123,13 @@ ostream & StdMeshers_FixedPoints1D::SaveTo(ostream & save) } listSize = _nbsegs.size(); - save << listSize; + save << " " << listSize; if ( listSize > 0 ) { for ( int i = 0; i < listSize; i++) save << " " << _nbsegs[i]; } listSize = _edgeIDs.size(); - save << listSize; + save << " " << listSize; if ( listSize > 0 ) { for ( int i = 0; i < listSize; i++) save << " " << _edgeIDs[i]; @@ -154,6 +154,7 @@ istream & StdMeshers_FixedPoints1D::LoadFrom(istream & load) isOK = (load >> intVal); if (isOK && intVal > 0) { + _params.clear(); _params.reserve( intVal ); for (int i = 0; i < _params.capacity() && isOK; i++) { isOK = (load >> dblVal); @@ -163,6 +164,7 @@ istream & StdMeshers_FixedPoints1D::LoadFrom(istream & load) isOK = (load >> intVal); if (isOK && intVal > 0) { + _nbsegs.clear(); _nbsegs.reserve( intVal ); for (int i = 0; i < _nbsegs.capacity() && isOK; i++) { isOK = (load >> intVal); @@ -172,6 +174,7 @@ istream & StdMeshers_FixedPoints1D::LoadFrom(istream & load) isOK = (load >> intVal); if (isOK && intVal > 0) { + _edgeIDs.clear(); _edgeIDs.reserve( intVal ); for (int i = 0; i < _edgeIDs.capacity() && isOK; i++) { isOK = (load >> intVal);