Use unsigned char to store devicesettings.

C++-11 complains allot about narrowing the int value to unsigned char in
the setting of these values to the OSTC3. This clears that warning, and
any confusion about these values.

Future work: Change these structures to use our "Subsurface"-types
instead.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Anton Lundin 2014-10-10 07:34:14 +02:00 committed by Dirk Hohndel
parent f3484d1148
commit eb485f8313

View file

@ -6,15 +6,15 @@
#include "libdivecomputer.h"
struct gas {
int oxygen;
int helium;
int type;
int depth;
unsigned char oxygen;
unsigned char helium;
unsigned char type;
unsigned char depth;
};
struct setpoint {
int sp;
int depth;
unsigned char sp;
unsigned char depth;
};
class DeviceDetails : public QObject