Return gas mix from model

Linus Torvalds torvalds at linux-foundation.org
Tue Oct 17 13:27:07 PDT 2017


On Tue, Oct 17, 2017 at 4:21 PM, Robert Helling <helling at atdotde.de> wrote:
>
> the problem I see is that we need that information in the diveProfileItem
> which gets its data from the divePlotDataModel. And that has random access
> not sequential (at least in theory).

You can do random access without the loop by just doing

>            struct gasmix *gasmix = NULL;
>            struct event *ev = NULL;
>            gasmix = get_gasmix(dive, dc, time, &ev, gasmix);

the loop is just the efficient model when you do it over and over again.

Please don't add pointless redundancy.

             Linus


More information about the subsurface mailing list