locale_facets.tcc (__int_to_char): Remove the const int parameter.
2003-10-22 Paolo Carlini <pcarlini@suse.de> * include/bits/locale_facets.tcc (__int_to_char): Remove the const int parameter. (_M_insert_int): Update caller. * src/locale-inst.cc (__int_to_char): Update instantiations. From-SVN: r72825
This commit is contained in:
parent
25412599b4
commit
3c21d6e0f7
3 changed files with 24 additions and 18 deletions
|
@ -1,3 +1,10 @@
|
|||
2003-10-22 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
* include/bits/locale_facets.tcc (__int_to_char): Remove
|
||||
the const int parameter.
|
||||
(_M_insert_int): Update caller.
|
||||
* src/locale-inst.cc (__int_to_char): Update instantiations.
|
||||
|
||||
2003-10-22 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
* include/bits/locale_facets.h: Correct byname facets for "C"
|
||||
|
|
|
@ -666,8 +666,8 @@ namespace std
|
|||
// Forwarding functions to peel signed from unsigned integer types.
|
||||
template<typename _CharT>
|
||||
inline int
|
||||
__int_to_char(_CharT* __out, const int __size, long __v,
|
||||
const _CharT* __lit, ios_base::fmtflags __flags)
|
||||
__int_to_char(_CharT* __bufend, long __v, const _CharT* __lit,
|
||||
ios_base::fmtflags __flags)
|
||||
{
|
||||
unsigned long __ul = static_cast<unsigned long>(__v);
|
||||
bool __neg = false;
|
||||
|
@ -676,20 +676,20 @@ namespace std
|
|||
__ul = -__ul;
|
||||
__neg = true;
|
||||
}
|
||||
return __int_to_char(__out, __size, __ul, __lit, __flags, __neg);
|
||||
return __int_to_char(__bufend, __ul, __lit, __flags, __neg);
|
||||
}
|
||||
|
||||
template<typename _CharT>
|
||||
inline int
|
||||
__int_to_char(_CharT* __out, const int __size, unsigned long __v,
|
||||
const _CharT* __lit, ios_base::fmtflags __flags)
|
||||
{ return __int_to_char(__out, __size, __v, __lit, __flags, false); }
|
||||
__int_to_char(_CharT* __bufend, unsigned long __v, const _CharT* __lit,
|
||||
ios_base::fmtflags __flags)
|
||||
{ return __int_to_char(__bufend, __v, __lit, __flags, false); }
|
||||
|
||||
#ifdef _GLIBCXX_USE_LONG_LONG
|
||||
template<typename _CharT>
|
||||
inline int
|
||||
__int_to_char(_CharT* __out, const int __size, long long __v,
|
||||
const _CharT* __lit, ios_base::fmtflags __flags)
|
||||
__int_to_char(_CharT* __bufend, long long __v, const _CharT* __lit,
|
||||
ios_base::fmtflags __flags)
|
||||
{
|
||||
unsigned long long __ull = static_cast<unsigned long long>(__v);
|
||||
bool __neg = false;
|
||||
|
@ -698,25 +698,24 @@ namespace std
|
|||
__ull = -__ull;
|
||||
__neg = true;
|
||||
}
|
||||
return __int_to_char(__out, __size, __ull, __lit, __flags, __neg);
|
||||
return __int_to_char(__bufend, __ull, __lit, __flags, __neg);
|
||||
}
|
||||
|
||||
template<typename _CharT>
|
||||
inline int
|
||||
__int_to_char(_CharT* __out, const int __size, unsigned long long __v,
|
||||
const _CharT* __lit, ios_base::fmtflags __flags)
|
||||
{ return __int_to_char(__out, __size, __v, __lit, __flags, false); }
|
||||
__int_to_char(_CharT* __bufend, unsigned long long __v, const _CharT* __lit,
|
||||
ios_base::fmtflags __flags)
|
||||
{ return __int_to_char(__bufend, __v, __lit, __flags, false); }
|
||||
#endif
|
||||
|
||||
template<typename _CharT, typename _ValueT>
|
||||
int
|
||||
__int_to_char(_CharT* __out, const int __size, _ValueT __v,
|
||||
const _CharT* __lit, ios_base::fmtflags __flags, bool __neg)
|
||||
__int_to_char(_CharT* __bufend, _ValueT __v, const _CharT* __lit,
|
||||
ios_base::fmtflags __flags, bool __neg)
|
||||
{
|
||||
// Don't write base if already 0.
|
||||
const bool __showbase = (__flags & ios_base::showbase) && __v;
|
||||
const ios_base::fmtflags __basefield = __flags & ios_base::basefield;
|
||||
_CharT* const __bufend = __out + __size;
|
||||
_CharT* __buf = __bufend - 1;
|
||||
|
||||
if (__builtin_expect(__basefield != ios_base::oct &&
|
||||
|
@ -823,7 +822,7 @@ namespace std
|
|||
// [22.2.2.2.2] Stage 1, numeric conversion to character.
|
||||
// Result is returned right-justified in the buffer.
|
||||
int __len;
|
||||
__len = __int_to_char(&__cs[0], __ilen, __v, __lit, __io.flags());
|
||||
__len = __int_to_char(__cs + __ilen, __v, __lit, __io.flags());
|
||||
__cs += __ilen - __len;
|
||||
|
||||
// Add grouping, if necessary.
|
||||
|
|
|
@ -239,13 +239,13 @@ namespace std
|
|||
|
||||
template
|
||||
int
|
||||
__int_to_char(C*, const int, unsigned long, const C*,
|
||||
__int_to_char(C*, unsigned long, const C*,
|
||||
ios_base::fmtflags, bool);
|
||||
|
||||
#ifdef _GLIBCXX_USE_LONG_LONG
|
||||
template
|
||||
int
|
||||
__int_to_char(C*, const int, unsigned long long, const C*,
|
||||
__int_to_char(C*, unsigned long long, const C*,
|
||||
ios_base::fmtflags, bool);
|
||||
#endif
|
||||
} // namespace std
|
||||
|
|
Loading…
Add table
Reference in a new issue