Skip to content
Snippets Groups Projects
Commit b3640a09 authored by Stephen A. Wood's avatar Stephen A. Wood Committed by Mark K Jones
Browse files

Add THcFormula copy constructor and simplify operator=

parent cc81cf4b
No related branches found
No related tags found
No related merge requests found
......@@ -85,15 +85,19 @@ THcFormula::THcFormula(const char* name, const char* expression,
THcFormula& THcFormula::operator=( const THcFormula& rhs )
{
if( this != &rhs ) {
TFormula::operator=(rhs);
THaFormula::operator=(rhs);
fParmList = rhs.fParmList;
fVarList = rhs.fVarList;
fCutList = rhs.fCutList;
fInstance = 0;
}
return *this;
}
//_____________________________________________________________________________
THcFormula::THcFormula( const THcFormula& rhs ) :
THaFormula(rhs), fParmList(rhs.fParmList)
{
// Copy ctor
}
//_____________________________________________________________________________
THcFormula::~THcFormula()
{
......
......@@ -19,6 +19,7 @@ public:
THcFormula( const char* name, const char* formula,
const THcParmList*, const THaVarList*,
const THaCutList* clst);
THcFormula( const THcFormula& rhs );
THcFormula& operator=( const THcFormula& rhs );
virtual ~THcFormula();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment