COMP: Fix for auto_ptr usage on VC6's broken implementation.
This commit is contained in:
parent
77c65b954e
commit
520b792f6f
|
@ -60,14 +60,16 @@ void cmExportLibraryDependenciesCommand::FinalPass()
|
||||||
std::auto_ptr<std::ofstream> foutPtr;
|
std::auto_ptr<std::ofstream> foutPtr;
|
||||||
if(append)
|
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
|
else
|
||||||
{
|
{
|
||||||
std::auto_ptr<cmGeneratedFileStream> ap(
|
std::auto_ptr<cmGeneratedFileStream> ap(
|
||||||
new cmGeneratedFileStream(fname.c_str(), true));
|
new cmGeneratedFileStream(fname.c_str(), true));
|
||||||
ap->SetCopyIfDifferent(true);
|
ap->SetCopyIfDifferent(true);
|
||||||
foutPtr.reset(ap.release());
|
foutPtr = ap;
|
||||||
}
|
}
|
||||||
std::ostream& fout = *foutPtr.get();
|
std::ostream& fout = *foutPtr.get();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue