From: Kaj-Michael Lang Date: Wed, 16 Jul 2008 13:33:52 +0000 (+0300) Subject: Position: Add position_clear() helper function X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7d6da25b47a982e00ee378677e6d1e1040af6a8;p=mapper Position: Add position_clear() helper function --- 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