From 81aa87df02aed0681c039bedeb83b4e5dff9fb9b Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Mon, 20 Jul 2015 00:18:54 -0400 Subject: [PATCH] Cleared -Wunused-but-set-variable from GCC 4.8 and GCC 5.1. The way to handle separators is via locales and facets --- integer.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/integer.cpp b/integer.cpp index 59a8f48a..3d52ae74 100644 --- a/integer.cpp +++ b/integer.cpp @@ -3376,24 +3376,21 @@ std::istream& operator>>(std::istream& in, Integer &a) std::ostream& operator<<(std::ostream& out, const Integer &a) { // Get relevant conversion specifications from ostream. - long f = out.flags() & std::ios::basefield; // Get base digits. - int base, block; + const long f = out.flags() & std::ios::basefield; // Get base digits. + int base; char suffix; switch(f) { case std::ios::oct : base = 8; - block = 8; suffix = 'o'; break; case std::ios::hex : base = 16; - block = 4; suffix = 'h'; break; default : base = 10; - block = 3; suffix = '.'; } @@ -3424,11 +3421,8 @@ std::ostream& operator<<(std::ostream& out, const Integer &a) } while (i--) - { out << s[i]; -// if (i && !(i%block)) -// out << ","; - } + return out << suffix; }