This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[v3] Remove a dead variable from _M_extract_int
- From: Paolo Carlini <pcarlini at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 25 Oct 2003 11:30:43 +0200
- Subject: [v3] Remove a dead variable from _M_extract_int
Hi,
very trivial but pleasant ;)
Tested x86-linux, committed.
Paolo.
///////////
2003-10-25 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (num_get::_M_extract_int):
__pos in only incremented, never used its value, remove it.
diff -urN libstdc++-v3-orig/include/bits/locale_facets.tcc libstdc++-v3/include/bits/locale_facets.tcc
--- libstdc++-v3-orig/include/bits/locale_facets.tcc 2003-10-25 09:49:35.000000000 +0200
+++ libstdc++-v3/include/bits/locale_facets.tcc 2003-10-25 11:16:39.000000000 +0200
@@ -288,14 +288,12 @@
__base = 10;
// First check for sign.
- int __pos = 0;
char_type __c = *__beg;
const bool __plus = __traits_type::eq(__c, __lit[_S_iplus]);
if ((__plus || __traits_type::eq(__c, __lit[_S_iminus]))
&& __beg != __end)
{
__xtrc += __plus ? _S_atoms_in[_S_iplus] : _S_atoms_in[_S_iminus];
- ++__pos;
__c = *(++__beg);
}
@@ -311,7 +309,6 @@
if (__found_zero)
{
__xtrc += _S_atoms_in[_S_izero];
- ++__pos;
if (__basefield == 0)
{
const bool __x = __traits_type::eq(__c, __lit[_S_ix]);
@@ -319,7 +316,6 @@
&& __beg != __end)
{
__xtrc += __x ? _S_atoms_in[_S_ix] : _S_atoms_in[_S_iX];
- ++__pos;
__c = *(++__beg);
__base = 16;
}
@@ -333,7 +329,6 @@
if (__traits_type::eq(__c, __lit[_S_izero]) && __beg != __end)
{
__xtrc += _S_atoms_in[_S_izero];
- ++__pos;
__c = *(++__beg);
const bool __x = __traits_type::eq(__c, __lit[_S_ix]);
@@ -341,7 +336,6 @@
&& __beg != __end)
{
__xtrc += __x ? _S_atoms_in[_S_ix] : _S_atoms_in[_S_iX];
- ++__pos;
__c = *(++__beg);
}
}
@@ -365,7 +359,6 @@
{
// Try first for acceptable digit; record it if found.
__xtrc += _S_atoms_in[__p - __lit];
- ++__pos;
++__sep_pos;
__c = *(++__beg);
}