Fix dangerous DeVP::sensor interface
- Jan 14, 2019
-
-
Gerhard Raven authored
* deprecate `sensorOfChannel(const LHCb::VPChannelID channel)` * add `sensor(LHCb::VPChannelID channel) const` The reason for this change is that there is already `sensor(unsigned int sensorNumber) const`, and because there is an implicitly defined conversion from VPChannelID to unsigned int, one _can_ invoke `sensor` already with a `VPChannelID`, which will result in an out-of-bounds access. To avoid this, the overload of `sensor` for `VPChannelID` is added, at which point there is no use anymore for `sensorOfChannel`...
-