From 3fb19492f14bcff3781eeaff40edf0bd45a03cc2 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 12 May 2011 17:43:20 -0400 Subject: [PATCH] more C++ annoyances --- format.patch | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/format.patch b/format.patch index 6744611..935b27b 100644 --- a/format.patch +++ b/format.patch @@ -1,6 +1,24 @@ diff -up gnome-system-monitor-3.1.1/src/load-graph.cpp.format gnome-system-monitor-3.1.1/src/load-graph.cpp ---- gnome-system-monitor-3.1.1/src/load-graph.cpp.format 2011-05-12 16:55:55.816792353 -0400 -+++ gnome-system-monitor-3.1.1/src/load-graph.cpp 2011-05-12 16:59:03.419446997 -0400 +--- gnome-system-monitor-3.1.1/src/load-graph.cpp.format 2011-05-09 17:45:06.000000000 -0400 ++++ gnome-system-monitor-3.1.1/src/load-graph.cpp 2011-05-12 17:43:01.136470995 -0400 +@@ -399,7 +399,7 @@ net_scale (LoadGraph *g, guint64 din, gu + new_max = 1.1 * new_max; + // make sure max is not 0 to avoid / 0 + // default to 125 bytes == 1kbit +- new_max = std::max(new_max, 125UL); ++ new_max = std::max(new_max, G_GUINT64_CONSTANT(125)); + + } else { + // round up to get some extra space +@@ -407,7 +407,7 @@ net_scale (LoadGraph *g, guint64 din, gu + new_max = 1.1 * new_max; + // make sure max is not 0 to avoid / 0 + // default to 1 KiB +- new_max = std::max(new_max, 1024UL); ++ new_max = std::max(new_max, G_GUINT64_CONSTANT(1024)); + + // decompose new_max = coef10 * 2**(base10 * 10) + // where coef10 and base10 are integers and coef10 < 2**10 @@ -433,11 +433,11 @@ net_scale (LoadGraph *g, guint64 din, gu g_assert(coef10 % g->num_bars() == 0);