HomeHEPForge

Fix modernization compiler errors and warnings.

Description

Fix modernization compiler errors and warnings.

Details

Auditors
tlatham
Provenance
jbackAuthored on Jan 30 2019, 2:34 PM
jbackPushed on Jan 30 2019, 2:35 PM
Parents
rEVTGEN2137c4de5590: Update EvtParser and EvtSLDiBaryonAmp from master.
Branches
Unknown
Tags
Unknown
Tasks
T13: Modernize EvtGen

Event Timeline

tlatham added a subscriber: tlatham.

Just a couple of minor queries. They are genuine questions but I do this largely to try out the code auditing procedures in Phabricator ;)

/src/EvtGenModels/EvtRareLbToLll.cpp
100

What was the compiler warning/error here?
It isn't clear to me why we've had to move to a dynamic allocation.
The original code does look a bit unusual, I would have expected:

EvtDiracParticle parent{};
/src/EvtGenModels/EvtVubNLO.cpp
613–615

I assume that the problem was that the compiler could not deduce the template parameters?
Given that, we can drop the use of auto, i.e. by doing:

std::array<double,6> gammaCoeffs { ... };
This commit now has outstanding concerns.Jan 31 2019, 2:12 PM
jback added inline comments.
/src/EvtGenModels/EvtRareLbToLll.cpp
100

The error was that the copy and assignment constructors for EvtDiracParticle are declared private, so the auto command didn't work. I will change this to use the object, as you suggest.

/src/EvtGenModels/EvtVubNLO.cpp
613–615

Yes, the compiler couldn't work out the template parameters. I will change this to as you suggest.

Thanks @jback, I see that the two small points I raised are implemented in rEVTGEN24d37621f536

All concerns with this commit have now been addressed.Feb 4 2019, 11:44 PM