<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 3 July 2016 at 04:27, Anton Lundin <span dir="ltr"><<a href="mailto:glance@acc.umu.se" target="_blank">glance@acc.umu.se</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">On 01 July, 2016 - Rick Walsh wrote:<br>
<br>
> Signed-off-by: Rick Walsh <<a href="mailto:rickmwalsh@gmail.com">rickmwalsh@gmail.com</a>><br>
> ---<br>
>  core/dive.h | 11 +++++++++++<br>
>  1 file changed, 11 insertions(+)<br>
><br>
> diff --git a/core/dive.h b/core/dive.h<br>
> index 5988990..6910eb2 100644<br>
> --- a/core/dive.h<br>
> +++ b/core/dive.h<br>
> @@ -481,6 +481,17 @@ static inline depth_t gas_mod(struct gasmix *mix, pressure_t po2_limit, struct d<br>
>       return rounded_depth;<br>
>  }<br>
><br>
> +/* Maximum narcotic depth rounded to multiples of roundto mm */<br>
> +static inline depth_t gas_mnd(struct gasmix *mix, int end, struct dive *dive, int roundto) {<br>
<br>
</span>I'd prefer if both end and roundto were depth_t's instead of int.<br>
Simpler to know the unit instead of needing to look at the code.<br>
<span class=""><font color="#888888"><br><br></font></span></blockquote><div>Thanks Anton,<br><br></div><div>I was in two minds as to whether to use int or depth_t for these functions.  In the end I went with int as there are a few other places in dive.h and elsewhere where int is used for depth, and I was trying to be least inconsistent.<br><br>I agree depth_t and the other special data types remove ambiguity, so I'll see if Robert or others have more comments, and either re-send the patch series using depth_t, or send a fixup patch.  If I get a bit of time I might even send a patch to use the special data types elsewhere and see what I break.<br></div></div><br></div><div class="gmail_extra">R<br></div></div>