From 520b792f6f8b65e6c387d4f9439898c8e81b49c8 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 16 Mar 2006 15:50:21 -0500 Subject: COMP: Fix for auto_ptr usage on VC6's broken implementation. --- Source/cmExportLibraryDependencies.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/cmExportLibraryDependencies.cxx b/Source/cmExportLibraryDependencies.cxx index 7dab940..6c56c3c 100644 --- a/Source/cmExportLibraryDependencies.cxx +++ b/Source/cmExportLibraryDependencies.cxx @@ -60,14 +60,16 @@ void cmExportLibraryDependenciesCommand::FinalPass() std::auto_ptr foutPtr; if(append) { - foutPtr.reset(new std::ofstream(fname.c_str(), std::ios::app)); + std::auto_ptr ap( + new std::ofstream(fname.c_str(), std::ios::app)); + foutPtr = ap; } else { std::auto_ptr ap( new cmGeneratedFileStream(fname.c_str(), true)); ap->SetCopyIfDifferent(true); - foutPtr.reset(ap.release()); + foutPtr = ap; } std::ostream& fout = *foutPtr.get(); -- cgit v0.12