From 2d09819ddfc6bbb4eb9bd7127485f42c839fd85b Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 17 Nov 2019 16:23:00 +0100 Subject: Filter: move number of shown dives to core We mark hidden/shown dives in the core but store the number of shown dives in the MultiFilterSortModel. Move this datum to the core for improved locality. Signed-off-by: Berthold Stoeger --- core/divelist.c | 1 + core/divelist.h | 1 + 2 files changed, 2 insertions(+) (limited to 'core') diff --git a/core/divelist.c b/core/divelist.c index a9ce0d7a3..4367b8708 100644 --- a/core/divelist.c +++ b/core/divelist.c @@ -899,6 +899,7 @@ void deselect_dive(struct dive *dive) } } +int shown_dives = 0; void filter_dive(struct dive *d, bool shown) { if (!d) diff --git a/core/divelist.h b/core/divelist.h index dc3ab1302..c0f70ccb6 100644 --- a/core/divelist.h +++ b/core/divelist.h @@ -9,6 +9,7 @@ extern "C" { #endif struct deco_state; +extern int shown_dives; /* this is used for both git and xml format */ #define DATAFORMAT_VERSION 3 -- cgit v1.2.3-70-g09d2