[gnome-boxes] mini-graph: Remove redundant constructor argument



commit 06a66d3f810f7c2e6d3f6ce2a296c40acf99a839
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Mon Feb 3 11:12:07 2014 +0100

    mini-graph: Remove redundant constructor argument
    
    No user is passing 'points' at construct time so lets remove it.

 src/mini-graph.vala |    4 ++--
 src/properties.vala |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/mini-graph.vala b/src/mini-graph.vala
index a795ddd..aff502b 100644
--- a/src/mini-graph.vala
+++ b/src/mini-graph.vala
@@ -20,12 +20,12 @@ private class Boxes.MiniGraph: Gtk.DrawingArea {
     }
     private bool ymax_set = false;
 
-    public MiniGraph (double[] points = {}, int npoints = -1) {
+    public MiniGraph (int npoints = -1) {
         this.points = points;
         this.npoints = npoints;
     }
 
-    public MiniGraph.with_ymax (double[] points, double ymax, int npoints = -1) {
+    public MiniGraph.with_ymax (double ymax, int npoints = -1) {
         this.points = points;
         this.ymax = ymax;
         this.npoints = npoints;
diff --git a/src/properties.vala b/src/properties.vala
index 3148601..9f18481 100644
--- a/src/properties.vala
+++ b/src/properties.vala
@@ -253,19 +253,19 @@ private class Boxes.Properties: GLib.Object, Boxes.UI {
         var label = new Gtk.Label (_("CPU:"));
         label.get_style_context ().add_class ("boxes-graph-label");
         grid.attach (label, 0, 1, 1, 1);
-        cpu = new MiniGraph.with_ymax ({}, 100.0, 20);
+        cpu = new MiniGraph.with_ymax (100.0, 20);
         grid.attach (cpu, 1, 1, 1, 1);
 
         label = new Gtk.Label (_("I/O:"));
         label.get_style_context ().add_class ("boxes-graph-label");
         grid.attach (label, 2, 1, 1, 1);
-        io = new MiniGraph ({}, 20);
+        io = new MiniGraph (20);
         grid.attach (io, 3, 1, 1, 1);
 
         label = new Gtk.Label (_("Net:"));
         label.get_style_context ().add_class ("boxes-graph-label");
         grid.attach (label, 4, 1, 1, 1);
-        net = new MiniGraph ({}, 20);
+        net = new MiniGraph (20);
         grid.attach (net, 5, 1, 1, 1);
 
         shutdown_button = new Button.with_label (_("Force Shutdown"));


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