switched PRunBase where possible to smart pointers.
This commit is contained in:
@ -99,7 +99,7 @@ PRunBase::PRunBase(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo,
|
||||
fFuncValues.push_back(0.0);
|
||||
|
||||
// generate theory
|
||||
fTheory = new PTheory(fMsrInfo, runNo);
|
||||
fTheory = std::make_unique<PTheory>(fMsrInfo, runNo);
|
||||
if (fTheory == nullptr) {
|
||||
std::cerr << std::endl << "**SEVERE ERROR** PRunBase::PRunBase: Couldn't create an instance of PTheory :-(, will quit" << std::endl;
|
||||
exit(0);
|
||||
@ -181,10 +181,7 @@ void PRunBase::SetFitRange(PDoublePairVector fitRange)
|
||||
*/
|
||||
void PRunBase::CleanUp()
|
||||
{
|
||||
if (fTheory) {
|
||||
delete fTheory;
|
||||
fTheory = nullptr;
|
||||
}
|
||||
fTheory.reset();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user