Skip to content

Fix all implicit casacore::Vector casts

Andre Offringa requested to merge fix-implicit-casacore-vector-casts into master

In https://github.com/casacore/casacore/pull/1189, the casacore::Vector constructor that takes a std::vector is made explicit. This unveils that DP3 uses a lot of implicit Vector casts, and this also highlights several cases where an implicit cast was not intended.

This MR makes DP3 compile again after making the casacore constructor explicit, and fixes all those occurences in mostly "the simplest" way. Even though, the MR is pretty large, and the changes in turn show many "less nice" conversions, including use of casacore::Vector that were implicit, and now become visible again.

My suggestion would be to review only whether the conversion was done properly/logically, and not include style fixes of touched code (unless I made it worse), or transforming casacore::Vector further to std::vector. While the (mostly unnecessary) mixing of std::vector and casacore::Vector isn't nice, I think this MR and the casacore change makes it easier to switch more towards std::vector in the future.

Edited by Andre Offringa

Merge request reports