summaryrefslogtreecommitdiffstats
path: root/Source/cmExportLibraryDependencies.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-03-16 20:50:21 (GMT)
committerBrad King <brad.king@kitware.com>2006-03-16 20:50:21 (GMT)
commit520b792f6f8b65e6c387d4f9439898c8e81b49c8 (patch)
tree45176ecc9f365daba449dac7fba12e0f91371da0 /Source/cmExportLibraryDependencies.cxx
parent77c65b954eeeec3f936ddb27beee2381f7a8956e (diff)
downloadCMake-520b792f6f8b65e6c387d4f9439898c8e81b49c8.zip
CMake-520b792f6f8b65e6c387d4f9439898c8e81b49c8.tar.gz
CMake-520b792f6f8b65e6c387d4f9439898c8e81b49c8.tar.bz2
COMP: Fix for auto_ptr usage on VC6's broken implementation.
Diffstat (limited to 'Source/cmExportLibraryDependencies.cxx')
-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();