[gnome-system-monitor] Stop initializing variables twice in LoadGraph ctor.
- From: Chris KÃhl <chriskuehl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-system-monitor] Stop initializing variables twice in LoadGraph ctor.
- Date: Mon, 4 Jul 2011 08:52:58 +0000 (UTC)
commit e5410092bd1a6edee184aa56fba807498733f06a
Author: Chris KÃhl <chrisk openismus com>
Date: Sun Jul 3 16:26:26 2011 +0200
Stop initializing variables twice in LoadGraph ctor.
src/load-graph.cpp | 15 +++++----------
1 files changed, 5 insertions(+), 10 deletions(-)
---
diff --git a/src/load-graph.cpp b/src/load-graph.cpp
index 3a61eeb..3b6a894 100644
--- a/src/load-graph.cpp
+++ b/src/load-graph.cpp
@@ -602,16 +602,16 @@ load_graph_destroy (GtkWidget *widget, gpointer data_ptr)
LoadGraph::LoadGraph(guint type)
- : fontsize(0.0),
- rmargin(0.0),
- indent(0.0),
+ : fontsize(8.0),
+ rmargin(3.5 * fontsize),
+ indent(24.0),
n(0),
- type(0),
+ type(type),
speed(0),
draw_width(0),
draw_height(0),
render_counter(0),
- frames_per_unit(0),
+ frames_per_unit(10), // this will be changed but needs initialising
graph_dely(0),
real_draw_height(0),
graph_delx(0.0),
@@ -629,12 +629,7 @@ LoadGraph::LoadGraph(guint type)
// FIXME:
// on configure, g->frames_per_unit = g->draw_width/(LoadGraph::NUM_POINTS);
// knock FRAMES down to 5 until cairo gets faster
- g->frames_per_unit = 10; // this will be changed but needs initialising
- g->fontsize = 8.0;
- g->rmargin = 3.5 * g->fontsize;
- g->indent = 24.0;
- g->type = type;
switch (type) {
case LOAD_GRAPH_CPU:
memset(&this->cpu, 0, sizeof g->cpu);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]