Skip to content

GenScan: changed std::vector typedefs to struct inheritting from std::array

Elliot Lipeles requested to merge lipeles/athena:lipeles_dev3 into main

This is a bug fix plus technical fix to avoid making similar bugs. I had used a typedef to a std::vector for something that should always be 5 long. The bug was that a one point, I assumed the std::vector had a length of 5 but it had never been set so I was going off the end of the memory. I tried changing it to std::array<double,5> which forces the sized to be 5, but that didn't work because some of the tools needed std::vector as input, so I classes that inherit from std::array<double,5> with appropriate cast operators to interface with std::vector.

(story is repeated for std::array<unsigned,5> which is also needed)

I've also removed some unneeded include statements.

@imaznas and @jahreda this should fix the problem you were seeing

Merge request reports