[PATCH 5/5] profile.h: fix incomplete type
Dirk Hohndel
dirk at hohndel.org
Fri Nov 6 10:05:10 PST 2015
Thanks for this series. It's getting us closer...
Still not quite there, but closer :-)
/D
On Fri, Nov 06, 2015 at 03:20:31PM +0200, Lubomir I. Ivanov wrote:
> From: "Lubomir I. Ivanov" <neolit123 at gmail.com>
>
> ruleritem.cpp throws an error about incomplete type
> 'struct gas_pressures'.
>
> 'struct gas_pressures' is defined in dive.h, so every header
> that has usage of the type needs to include dive.h.
>
> Such a header is profile.h which has 'struct gas_pressures pressures'
> in 'struct plot_data', by including dive.h on top of profile.h
> every source file (e.g. ruleritem.cpp) that includes profile.h will
> now receive knowledge of a complete 'struct gas_pressures' type.
>
> Signed-off-by: Lubomir I. Ivanov <neolit123 at gmail.com>
> ---
> dive.h is a pretty big header and it has a lot of stuff which has
> to go. files like ruleritem.cpp need not know about things like:
>
> extern int subsurface_zip_close(struct zip *zip);
> extern void subsurface_console_init(bool dedicated);
> extern void subsurface_console_exit(void);
> ---
> subsurface-core/profile.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/subsurface-core/profile.h b/subsurface-core/profile.h
> index a6dbfcf..71929f8 100644
> --- a/subsurface-core/profile.h
> +++ b/subsurface-core/profile.h
> @@ -5,6 +5,8 @@
> extern "C" {
> #endif
>
> +#include "dive.h"
> +
> typedef enum {
> STABLE,
> SLOW,
> --
> 1.7.11.msysgit.0
>
> _______________________________________________
> subsurface mailing list
> subsurface at subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
More information about the subsurface
mailing list