mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Avoid using type 'gasmix_t': use 'struct gasmix' instead
libdivecomputer already uses 'gasmix_t' for its own gasmix thing. I don't like th eway we step on each others name spaces, but hey, might as well just use 'struct gasmix' and avoid the typedef. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
9cb60c9106
commit
afffcdbc0d
3 changed files with 5 additions and 5 deletions
2
dive.c
2
dive.c
|
@ -246,7 +246,7 @@ static void merge_cylinder_type(cylinder_type_t *res, cylinder_type_t *a, cylind
|
||||||
*res = *b;
|
*res = *b;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void merge_cylinder_mix(gasmix_t *res, gasmix_t *a, gasmix_t *b)
|
static void merge_cylinder_mix(struct gasmix *res, struct gasmix *a, struct gasmix *b)
|
||||||
{
|
{
|
||||||
if (a->o2.permille)
|
if (a->o2.permille)
|
||||||
b = a;
|
b = a;
|
||||||
|
|
6
dive.h
6
dive.h
|
@ -69,10 +69,10 @@ typedef struct {
|
||||||
int grams;
|
int grams;
|
||||||
} weight_t;
|
} weight_t;
|
||||||
|
|
||||||
typedef struct {
|
struct gasmix {
|
||||||
fraction_t o2;
|
fraction_t o2;
|
||||||
fraction_t he;
|
fraction_t he;
|
||||||
} gasmix_t;
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
volume_t size;
|
volume_t size;
|
||||||
|
@ -82,7 +82,7 @@ typedef struct {
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
cylinder_type_t type;
|
cylinder_type_t type;
|
||||||
gasmix_t gasmix;
|
struct gasmix gasmix;
|
||||||
pressure_t start, end;
|
pressure_t start, end;
|
||||||
} cylinder_t;
|
} cylinder_t;
|
||||||
|
|
||||||
|
|
|
@ -998,7 +998,7 @@ static void dive_start(void)
|
||||||
memset(&tm, 0, sizeof(tm));
|
memset(&tm, 0, sizeof(tm));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sanitize_gasmix(gasmix_t *mix)
|
static void sanitize_gasmix(struct gasmix *mix)
|
||||||
{
|
{
|
||||||
unsigned int o2, he;
|
unsigned int o2, he;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue