summaryrefslogtreecommitdiffstats
path: root/stats/statshelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'stats/statshelper.cpp')
-rw-r--r--stats/statshelper.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/stats/statshelper.cpp b/stats/statshelper.cpp
index d84ce20cf..b08c12077 100644
--- a/stats/statshelper.cpp
+++ b/stats/statshelper.cpp
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include "statshelper.h"
+#include "core/dive.h"
#include <cmath>
@@ -8,3 +9,9 @@ QPointF roundPos(const QPointF &p)
{
return QPointF(round(p.x()), round(p.y()));
}
+
+bool allDivesSelected(const std::vector<dive *> &dives)
+{
+ return std::all_of(dives.begin(), dives.end(),
+ [] (const dive *d) { return d->selected; });
+}