Fix run-time errors during debug of Windows version

This commit is contained in:
abd 2008-04-21 11:39:59 +00:00
parent fe6220c161
commit 14a90ed290
2 changed files with 5 additions and 4 deletions

View File

@ -198,13 +198,14 @@ namespace SMESH {
}
}
TVisualObjCont::iterator anIter = VISUAL_OBJ_CONT.begin();
for ( ; anIter != VISUAL_OBJ_CONT.end(); ++anIter ) {
for ( ; anIter != VISUAL_OBJ_CONT.end(); anIter++ ) {
int curId = anIter->first.first;
if ( curId == studyID ) {
// for unknown reason, object destructor is not called, so clear object manually
anIter->second->GetUnstructuredGrid()->SetCells(0,0,0);
anIter->second->GetUnstructuredGrid()->SetPoints(0);
VISUAL_OBJ_CONT.erase( anIter-- ); // dercement occures before erase()
VISUAL_OBJ_CONT.erase( anIter ); // dercement occures before erase()
anIter = VISUAL_OBJ_CONT.begin(); //reinitialize iterator after erase operation
}
}
}

View File

@ -2500,7 +2500,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::SaveASCII( SALOMEDS::SComponent_ptr theComponent
bool isMultiFile ) {
if(MYDEBUG) MESSAGE( "SMESH_Gen_i::SaveASCII" );
SALOMEDS::TMPFile_var aStreamFile = Save( theComponent, theURL, isMultiFile );
return aStreamFile._retn();
//return aStreamFile._retn();
//after usual saving needs to encipher binary to text string
//Any binary symbol will be represent as "|xx" () hexadecimal format number
@ -3553,7 +3553,7 @@ bool SMESH_Gen_i::LoadASCII( SALOMEDS::SComponent_ptr theComponent,
const char* theURL,
bool isMultiFile ) {
if(MYDEBUG) MESSAGE( "SMESH_Gen_i::LoadASCII" );
return Load( theComponent, theStream, theURL, isMultiFile );
//return Load( theComponent, theStream, theURL, isMultiFile );
//before call main ::Load method it's need for decipher text format to
//binary ( "|xx" => x' )