locale_facets.tcc (num_put::do_put(bool)): Use locale cache for truename and falsename.
authorJerry Quinn <jlquinn@optonline.net>
Sat, 8 Mar 2003 06:28:20 +0000 (06:28 +0000)
committerJerry Quinn <jlquinn@gcc.gnu.org>
Sat, 8 Mar 2003 06:28:20 +0000 (06:28 +0000)
2003-03-08  Jerry Quinn  <jlquinn@optonline.net>

* include/bits/locale_facets.tcc (num_put::do_put(bool)): Use
locale cache for truename and falsename.

From-SVN: r63970

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/locale_facets.tcc

index ef7a1a312f496b82f749229ca9c9f017516f779b..ffc04bc01004f399430f5eeaccb30d224f2a5691 100644 (file)
@@ -1,3 +1,8 @@
+2003-03-08  Jerry Quinn  <jlquinn@optonline.net>
+
+       * include/bits/locale_facets.tcc (num_put::do_put(bool)): Use
+       locale cache for truename and falsename.
+
 2003-03-08  Jerry Quinn  <jlquinn@optonline.net>
 
        * src/ios.cc (ios_base::ios_base): Correct order of _M_word and
index b5b1f5c2e1e79688920e746e80a01d789dd32346..ab21bf34cfd47829120b62cf1d716109c4d91428 100644 (file)
@@ -974,14 +974,14 @@ namespace std
         }
       else
         {
-          locale __loc = __io.getloc();
-         const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc); 
+         typedef __locale_cache<_CharT> __cache_type;
+         __cache_type& __lc = static_cast<__cache_type&>(__io._M_cache());
          typedef basic_string<_CharT>  __string_type;
          __string_type __name;
           if (__v)
-           __name = __np.truename();
+           __name = __lc.truename();
           else
-           __name = __np.falsename();
+           __name = __lc.falsename();
 
          const _CharT* __cs = __name.c_str();
          int __len = __name.size();