[GME-commit] GMESRC/SDK/BON/tools/ComponentConfig VcprojHandler.cpp,1.2,1.3

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Fri Feb 25 17:56:58 CST 2005


Update of /var/lib/gme/GMESRC/SDK/BON/tools/ComponentConfig
In directory braindrain:/tmp/cvs-serv22495

Modified Files:
	VcprojHandler.cpp 
Log Message:
Fixing bug.


CVS User: zolmol

Index: VcprojHandler.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/SDK/BON/tools/ComponentConfig/VcprojHandler.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** VcprojHandler.cpp	2 Feb 2005 00:29:01 -0000	1.2
--- VcprojHandler.cpp	25 Feb 2005 23:56:52 -0000	1.3
***************
*** 2,5 ****
--- 2,6 ----
  #include "VcprojHandler.h"
  #include "Afxwin.h"
+ #include "vector"
  
  void VcprojHandler::BSTRreplace( const CComBSTR& outf, CComBSTR& outf_new, const CString& old_n, const CString& new_n)
***************
*** 117,128 ****
  	}
  
- //-
- 	// remove the old file
- 	hr = spProject->RemoveFile( spOldFile);
- 	if( FAILED( hr))
- 	{
- 		scout << "Error: cannot remove old file from project." << endl;
- 	}
- 
  	return 0;
  }
--- 118,121 ----
***************
*** 602,605 ****
--- 595,599 ----
  	}
  
+ 
  	//
  	// Access Files collection
***************
*** 611,614 ****
--- 605,609 ----
  
  		// Access all files in the project
+ 		std::vector< CComPtr<VCFile> > todel;
  		long e1 = 0;
  		spCol->get_Count( &e1);
***************
*** 643,649 ****
  						{
  							swapFiles( spFile, rp, new_rp, spProject); // spFile will be deleted
  						}
- 					}
  				}
  			}
  		}
--- 638,652 ----
  						{
  							swapFiles( spFile, rp, new_rp, spProject); // spFile will be deleted
+ 							todel.push_back( spFile );
  						}
  				}
+ 		}
+ 
+ 		for( unsigned int lll = 0; lll < todel.size(); ++lll)
+ 		{
+ 			hr = spProject->RemoveFile( todel[ lll ] );
+ 			if( FAILED( hr))
+ 			{
+ 				scout << "Error: cannot remove old file from project." << endl;
  			}
  		}



More information about the GME-commit mailing list