[libshumate] view: Rename variable to clarify unit
- From: Corentin Noël <corentinnoel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libshumate] view: Rename variable to clarify unit
- Date: Fri, 5 Mar 2021 13:23:15 +0000 (UTC)
commit 0ade17f3ff8b813e6b927a3655aadd44fee088ff
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Mar 5 07:36:28 2021 -0300
view: Rename variable to clarify unit
'duration' by itself isn't descriptive to the time unit is uses, rename
it to 'duration_ms' to make it clear it's in milliseconds.
shumate/shumate-view.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/shumate/shumate-view.c b/shumate/shumate-view.c
index 75a8f9c..b63e0e1 100644
--- a/shumate/shumate-view.c
+++ b/shumate/shumate-view.c
@@ -470,14 +470,14 @@ static void
shumate_view_go_to_with_duration (ShumateView *view,
double latitude,
double longitude,
- guint duration) /* In ms */
+ guint duration_ms)
{
ShumateViewPrivate *priv = shumate_view_get_instance_private (view);
GoToContext *ctx;
g_return_if_fail (SHUMATE_IS_VIEW (view));
- if (duration == 0)
+ if (duration_ms == 0)
{
shumate_view_center_on (view, latitude, longitude);
return;
@@ -487,7 +487,7 @@ shumate_view_go_to_with_duration (ShumateView *view,
ctx = g_slice_new (GoToContext);
ctx->start_us = g_get_monotonic_time ();
- ctx->duration_us = ms_to_us (duration);
+ ctx->duration_us = ms_to_us (duration_ms);
ctx->from_latitude = shumate_location_get_latitude (SHUMATE_LOCATION (priv->viewport));
ctx->from_longitude = shumate_location_get_longitude (SHUMATE_LOCATION (priv->viewport));
ctx->to_latitude = latitude;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]