stefan pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=821d68ded1dc3f5cca016f3a4e80f48237f27c11
commit 821d68ded1dc3f5cca016f3a4e80f48237f27c11 Author: Stefan Schmidt <[email protected]> Date: Tue Nov 11 12:02:10 2014 +0100 elocation: Check if the passed in address/position/status is already up to date This API needs to get rewritten when the GeoClue2 support lands. --- src/lib/elocation/elocation.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/elocation/elocation.c b/src/lib/elocation/elocation.c index 2b79526..2478c51 100644 --- a/src/lib/elocation/elocation.c +++ b/src/lib/elocation/elocation.c @@ -1106,6 +1106,7 @@ EAPI Eina_Bool elocation_address_get(Elocation_Address *address_shadow) { if (!address) return EINA_FALSE; + if (address == address_shadow) return EINA_TRUE; address_shadow = address; return EINA_TRUE; @@ -1116,6 +1117,7 @@ EAPI Eina_Bool elocation_position_get(Elocation_Position *position_shadow) { if (!position) return EINA_FALSE; + if (position == position_shadow) return EINA_TRUE; position_shadow = position; return EINA_TRUE; @@ -1126,6 +1128,7 @@ EAPI Eina_Bool elocation_status_get(int *status_shadow) { if (status < 0) return EINA_FALSE; + if (&status == status_shadow) return EINA_TRUE; status_shadow = &status; return EINA_TRUE; --
