From cfd3b640711a3abb9bb0ff39b959e91eeef2ffd0 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 8 Feb 2010 11:08:29 +0100 Subject: fix my goof in to_string() Signed-off-by: Denys Vlasenko --- inc/abrtlib.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'inc') diff --git a/inc/abrtlib.h b/inc/abrtlib.h index 5e0dc462..443c3725 100644 --- a/inc/abrtlib.h +++ b/inc/abrtlib.h @@ -261,12 +261,12 @@ double get_dirsize_find_largest_dir( std::string unsigned_to_string(unsigned long long x); std::string signed_to_string(long long x); -template +template inline std::string to_string(T x) { - if (T(~T(0)) < T(0)) /* T is a signed type */ - return unsigned_to_string(x); - return signed_to_string(x); + if ((T)~(T)0 < (T)0) /* T is a signed type */ + return signed_to_string(x); + return unsigned_to_string(x); } void parse_args(const char *psArgs, vector_string_t& pArgs, int quote = -1); -- cgit