diff --git a/src/process-monitor.c b/src/process-monitor.c index e21ee1c..735879f 100644 --- a/src/process-monitor.c +++ b/src/process-monitor.c @@ -134,8 +134,7 @@ xtm_process_monitor_graph_surface_create (XtmProcessMonitor *monitor, gint width { cairo_t *cr; cairo_surface_t *graph_surface; - gfloat *peak; - gdouble step_size; + gdouble peak, step_size; gint i; if (monitor->history->len <= 1) @@ -157,9 +156,9 @@ xtm_process_monitor_graph_surface_create (XtmProcessMonitor *monitor, gint width cairo_move_to (cr, width, height); for (i = 0; (step_size * (i - 1)) <= width; i++) { - peak = &g_array_index (monitor->history, gfloat, i); + peak = g_array_index (monitor->history, gfloat, i); cairo_translate (cr, -step_size, 0); - cairo_line_to (cr, width, (1.0 - ((gdouble)(*peak))) * height); + cairo_line_to (cr, width, (1.0 - peak) * height); } if (monitor->type == 0) @@ -182,9 +181,9 @@ xtm_process_monitor_graph_surface_create (XtmProcessMonitor *monitor, gint width cairo_move_to (cr, width, height); for (i = 0; (step_size * (i - 1)) <= width; i++) { - peak = &g_array_index (monitor->history_swap, gfloat, i); + peak = g_array_index (monitor->history_swap, gfloat, i); cairo_translate (cr, -step_size, 0); - cairo_line_to (cr, width, (1.0 - ((gdouble)(*peak))) * height); + cairo_line_to (cr, width, (1.0 - peak) * height); } cairo_set_source_rgba (cr, 0.33, 0.04, 0.16, 0.3); cairo_line_to (cr, width, height);