[gnac/devel] Cleaned up the code



commit 95d38516f46bb2ac625f5629abea4a541740d97d
Author: Benoît Dupasquier <bdupasqu src gnome org>
Date:   Thu Jul 8 18:31:52 2010 +0100

    Cleaned up the code

 src/gnac-main.c  |    1 -
 src/gnac-utils.c |   15 ++++-----------
 src/gnac-utils.h |    3 ---
 3 files changed, 4 insertions(+), 15 deletions(-)
---
diff --git a/src/gnac-main.c b/src/gnac-main.c
index ed55c41..a7818be 100644
--- a/src/gnac-main.c
+++ b/src/gnac-main.c
@@ -997,7 +997,6 @@ main(gint    argc,
 
   conversion_errors = FALSE;
   prev_time_left = -1;
-  gnac_utils_moving_avg_init();
   state = prev_state = GNAC_AUDIO_EMPTY_STATE;
 
   /* Init gstreamer plugins helper*/
diff --git a/src/gnac-utils.c b/src/gnac-utils.c
index 5249f9c..daf617b 100644
--- a/src/gnac-utils.c
+++ b/src/gnac-utils.c
@@ -35,8 +35,8 @@
 
 #define GNAC_UTILS_ICON_BORDER_WIDTH 1
 
-static guint64  average;
-static guint64  total_samples;
+static guint64 average = 0;
+static guint64 total_samples = 0;
 
 
 gchar *
@@ -91,14 +91,6 @@ gnac_utils_format_duration_for_display(guint64 duration)
 }
 
 
-void
-gnac_utils_moving_avg_init(void)
-{
-  average = 0;
-  total_samples = 0;
-}
-
-
 guint64 
 gnac_utils_moving_avg_add_sample(guint64 sample)
 {
@@ -112,7 +104,8 @@ gnac_utils_moving_avg_add_sample(guint64 sample)
 void
 gnac_utils_moving_avg_reset(void)
 {
-  gnac_utils_moving_avg_init();
+  average = 0;
+  total_samples = 0;
 }
 
 
diff --git a/src/gnac-utils.h b/src/gnac-utils.h
index 775c37f..941968e 100644
--- a/src/gnac-utils.h
+++ b/src/gnac-utils.h
@@ -37,9 +37,6 @@ gnac_utils_get_display_name(const gchar  *uri,
 gchar *
 gnac_utils_format_duration_for_display(guint64 duration);
 
-void
-gnac_utils_moving_avg_init(void);
-
 guint64 
 gnac_utils_moving_avg_add_sample(guint64 sample);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]