[GME-commit] GMESRC/Tools/GMEMerge Merge.h,1.1,1.2 Merge.cpp,1.1,1.2

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Tue Aug 15 22:56:28 CDT 2006


Update of /project/gme-repository/GMESRC/Tools/GMEMerge
In directory escher:/tmp/cvs-serv25342

Modified Files:
	Merge.h Merge.cpp 
Log Message:
no message

CVS User: Gyorgy Balogh, ISIS (bogyom)

Index: Merge.h
===================================================================
RCS file: /project/gme-repository/GMESRC/Tools/GMEMerge/Merge.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Merge.h	15 Aug 2006 19:33:37 -0000	1.1
--- Merge.h	15 Aug 2006 21:56:26 -0000	1.2
***************
*** 56,59 ****
--- 56,60 ----
  typedef std::map<GUID,GUIDVec,GUID_less>		     GUIDVecMap;
  typedef std::map<GUID,CComPtr<IMgaObject>,GUID_less> ObjMap;
+ typedef std::vector<CComPtr<IMgaObject> >			 ObjVec;
  
  

Index: Merge.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/Tools/GMEMerge/Merge.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Merge.cpp	15 Aug 2006 19:33:37 -0000	1.1
--- Merge.cpp	15 Aug 2006 21:56:26 -0000	1.2
***************
*** 109,112 ****
--- 109,113 ----
  {
  	ObjMap act, mergin;
+ 	ObjVec destroy;
  	
  	addSubTreeToMap( CComPtr<IMgaObject>(act_root), act );
***************
*** 122,131 ****
  			ObjMap::iterator it2 = mergin.find(it->first);
  			if( it2 == mergin.end() )
! 			{
! 				it->second->DestroyObject();
! 			}
  		}
  		it++;
  	}	
  }
  
--- 123,138 ----
  			ObjMap::iterator it2 = mergin.find(it->first);
  			if( it2 == mergin.end() )
! 				destroy.push_back( it->second );				
  		}
  		it++;
  	}	
+ 
+ 	// destroy objects
+ 	ObjVec::iterator it3 = destroy.begin();
+ 	while( it3 != destroy.end() )
+ 	{
+ 		(*it3)->DestroyObject();
+ 		it3++;
+ 	}
  }
  
***************
*** 934,939 ****
  		COMTHROW( obj->QueryInterface(&fco) );
  		COMTHROW( fco->get_RegistryNode(L"inClosure", &node ) );
- 
- 
  	}
  	else if( type == OBJTYPE_FOLDER )
--- 941,944 ----



More information about the GME-commit mailing list