summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmExportLibraryDependencies.cxx6
1 files 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<std::ofstream> foutPtr;
if(append)
{
- foutPtr.reset(new std::ofstream(fname.c_str(), std::ios::app));
+ std::auto_ptr<std::ofstream> ap(
+ new std::ofstream(fname.c_str(), std::ios::app));
+ foutPtr = ap;
}
else
{
std::auto_ptr<cmGeneratedFileStream> ap(
new cmGeneratedFileStream(fname.c_str(), true));
ap->SetCopyIfDifferent(true);
- foutPtr.reset(ap.release());
+ foutPtr = ap;
}
std::ostream& fout = *foutPtr.get();