There are several places with statements like this:
if (0 <= id && id <= _devices.size()) {
an id that is equal to _devices.size() would be out of range - for example, if there is one element in _devices, _devices.size() would be 1. _devices[1] would be out of range.
Also because id is unsigned, it is by definition >= 0, so the first test is not necessary. The entire statement should be:
Original report by Paul Andrews (Bitbucket: [Paul Andrews](https://bitbucket.org/Paul Andrews), ).
There are several places with statements like this:
an id that is equal to _devices.size() would be out of range - for example, if there is one element in _devices, _devices.size() would be 1. _devices[1] would be out of range.
Also because id is unsigned, it is by definition >= 0, so the first test is not necessary. The entire statement should be: