From a7d6da25b47a982e00ee378677e6d1e1040af6a8 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Wed, 16 Jul 2008 16:33:52 +0300 Subject: [PATCH] Position: Add position_clear() helper function --- libs/libgtkmap/position.c | 6 ++++++ libs/libgtkmap/position.h | 1 + 2 files changed, 7 insertions(+) diff --git a/libs/libgtkmap/position.c b/libs/libgtkmap/position.c index c6558d7..8e29544 100644 --- a/libs/libgtkmap/position.c +++ b/libs/libgtkmap/position.c @@ -52,3 +52,9 @@ pos->lat=valid ? lat : NAN; pos->lon=valid ? lon : NAN; pos->altitude=valid ? lon : NAN; } + +void +position_clear(Position *pos) +{ +position_set(pos, FALSE, NAN, NAN, NAN); +} diff --git a/libs/libgtkmap/position.h b/libs/libgtkmap/position.h index 721510d..d2c4e01 100644 --- a/libs/libgtkmap/position.h +++ b/libs/libgtkmap/position.h @@ -31,5 +31,6 @@ struct _Position { Position *position_new(PositionType type, guint id); void position_free(Position *p); void position_set(Position *pos, gboolean valid, gdouble lat, gdouble lon, gfloat alt); +void position_clear(Position *pos); #endif -- 2.39.5