summaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-12-17 16:01:53 +0100
committerinfirit <[email protected]>2014-12-17 17:23:02 +0100
commitc9be17a1d0d6c2877407a15525de8f7b40c74d8c (patch)
tree43c881592d6bc92095101d79fba7110b0e7e990b /src/util.cpp
parentab23523d7ae2b62d7c633773739e7694a0ce82a2 (diff)
downloadmate-system-monitor-c9be17a1d0d6c2877407a15525de8f7b40c74d8c.tar.bz2
mate-system-monitor-c9be17a1d0d6c2877407a15525de8f7b40c74d8c.tar.xz
Fix for issues on 32-bit machines
Taken from GSM commit: 843cc40119d36873f9670975c7815fbd38481093 From: Chris Kühl <[email protected]> Gnome bug: Fix for issues on 32-bit machines
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 8d7694d..e27f43a 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -163,14 +163,14 @@ procman::format_size(guint64 size, guint64 max_size, bool want_bits)
};
const Format all_formats[2][4] = {
- { { 1UL << 10, N_("%.1f KiB") },
- { 1UL << 20, N_("%.1f MiB") },
- { 1UL << 30, N_("%.1f GiB") },
- { 1UL << 40, N_("%.1f TiB") } },
- { { 1000, N_("%.1f kbit") },
- { 1000000, N_("%.1f Mbit") },
- { 1000000000, N_("%.1f Gbit") },
- { 1000000000000, N_("%.1f Tbit") } }
+ { { G_GUINT64_CONSTANT(1) << 10, N_("%.1f KiB") },
+ { G_GUINT64_CONSTANT(1) << 20, N_("%.1f MiB") },
+ { G_GUINT64_CONSTANT(1) << 30, N_("%.1f GiB") },
+ { G_GUINT64_CONSTANT(1) << 40, N_("%.1f TiB") } },
+ { { G_GUINT64_CONSTANT(1000), N_("%.1f kbit") },
+ { G_GUINT64_CONSTANT(1000000), N_("%.1f Mbit") },
+ { G_GUINT64_CONSTANT(1000000000), N_("%.1f Gbit") },
+ { G_GUINT64_CONSTANT(1000000000000), N_("%.1f Tbit") } }
};
const Format (&formats)[4] = all_formats[want_bits ? 1 : 0];