locale_facets.tcc (__int_to_char): Remove the const int parameter.
authorPaolo Carlini <pcarlini@suse.de>
Wed, 22 Oct 2003 21:53:21 +0000 (21:53 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 22 Oct 2003 21:53:21 +0000 (21:53 +0000)
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

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/locale_facets.tcc
libstdc++-v3/src/locale-inst.cc

index 9100bb19a60e742a583ff994c26fadf72c0c33a0..218ce7a9047c3078e13eb6eadf82c195140e3a89 100644 (file)
@@ -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"
index ad965bab207a065f9d2f6b1fa6c57b8cc51a27e5..0f8d2b5d23204c269e6187afce534c2d642f81a9 100644 (file)
@@ -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. 
index 27a51f04afb034a717db59521cf8ed299fa7400e..35140ea70945e11d5ba4e90e7ca79cd149c1f32a 100644 (file)
@@ -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