diff options
Diffstat (limited to 'Source/cmCustomCommand.cxx')
-rw-r--r-- | Source/cmCustomCommand.cxx | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/Source/cmCustomCommand.cxx b/Source/cmCustomCommand.cxx index 20908a5..ae702e5 100644 --- a/Source/cmCustomCommand.cxx +++ b/Source/cmCustomCommand.cxx @@ -33,7 +33,7 @@ cmCustomCommand::cmCustomCommand(const cmCustomCommand& r): WorkingDirectory(r.WorkingDirectory), EscapeAllowMakeVars(r.EscapeAllowMakeVars), EscapeOldStyle(r.EscapeOldStyle), - Backtrace(new cmListFileBacktrace(*r.Backtrace)) + Backtrace(r.Backtrace) { } @@ -54,11 +54,7 @@ cmCustomCommand& cmCustomCommand::operator=(cmCustomCommand const& r) this->EscapeAllowMakeVars = r.EscapeAllowMakeVars; this->EscapeOldStyle = r.EscapeOldStyle; this->ImplicitDepends = r.ImplicitDepends; - - cmsys::auto_ptr<cmListFileBacktrace> - newBacktrace(new cmListFileBacktrace(*r.Backtrace)); - delete this->Backtrace; - this->Backtrace = newBacktrace.release(); + this->Backtrace = r.Backtrace; return *this; } @@ -77,21 +73,19 @@ cmCustomCommand::cmCustomCommand(cmMakefile const* mf, Comment(comment?comment:""), WorkingDirectory(workingDirectory?workingDirectory:""), EscapeAllowMakeVars(false), - EscapeOldStyle(true), - Backtrace(new cmListFileBacktrace) + EscapeOldStyle(true) { this->EscapeOldStyle = true; this->EscapeAllowMakeVars = false; if(mf) { - *this->Backtrace = mf->GetBacktrace(); + this->Backtrace = mf->GetBacktrace(); } } //---------------------------------------------------------------------------- cmCustomCommand::~cmCustomCommand() { - delete this->Backtrace; } //---------------------------------------------------------------------------- @@ -166,7 +160,7 @@ void cmCustomCommand::SetEscapeAllowMakeVars(bool b) //---------------------------------------------------------------------------- cmListFileBacktrace const& cmCustomCommand::GetBacktrace() const { - return *this->Backtrace; + return this->Backtrace; } //---------------------------------------------------------------------------- |