From 6232d13f5321b87ddf12a1aa36b4545da45f173d Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Wed, 17 Nov 2021 22:34:57 +0100 Subject: Travel3: Simple image and video display site Reads the images and videos from filesystem and builds a site in memroy. --- src/location.hh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/location.hh (limited to 'src/location.hh') diff --git a/src/location.hh b/src/location.hh new file mode 100644 index 0000000..ce4984e --- /dev/null +++ b/src/location.hh @@ -0,0 +1,23 @@ +#ifndef LOCATION_HH +#define LOCATION_HH + +#include +#include + +struct Location { + double lat; + double lng; + + Location(double lat, double lng) + : lat(lat), lng(lng) {} + + Location() + : lat(std::numeric_limits::quiet_NaN()), + lng(std::numeric_limits::quiet_NaN()) {} + + bool empty() const { + return std::isnan(lat) || std::isnan(lng); + } +}; + +#endif // LOCATION_HH -- cgit v1.2.3-70-g09d2