Skip to content
Snippets Groups Projects

Fix dangerous DeVP::sensor interface

Merged Gerhard Raven requested to merge improve-DeVP-sensor into master
  • 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...

Edited by Marco Cattaneo

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading