mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: convert cylinder_t and cylinder_table to C++
This had to be done simultaneously, because the table macros do not work properly with C++ objects. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
284582d2e8
commit
28520da655
48 changed files with 593 additions and 710 deletions
|
@ -335,7 +335,7 @@ void ws_end(struct parser_state *state)
|
|||
*/
|
||||
static int sanitize_sensor_id(const struct dive *d, int nr)
|
||||
{
|
||||
return d && nr >= 0 && nr < d->cylinders.nr ? nr : NO_SENSOR;
|
||||
return d && nr >= 0 && static_cast<size_t>(nr) < d->cylinders.size() ? nr : NO_SENSOR;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue