more C++ annoyances

This commit is contained in:
Matthias Clasen 2011-05-12 17:43:20 -04:00
parent 2980b71278
commit 3fb19492f1

View File

@ -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);