Cleared -Wunused-but-set-variable from GCC 4.8 and GCC 5.1. The way to handle separators is via locales and facets

pull/35/head
Jeffrey Walton 2015-07-20 00:18:54 -04:00
parent cf43ed07e3
commit 81aa87df02
1 changed files with 3 additions and 9 deletions

View File

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