]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
locale.cc (__use_cache<numpunct>): Move from here ...
authorJerry Quinn <jlquinn@optonline.net>
Tue, 1 Jul 2003 02:55:20 +0000 (02:55 +0000)
committerJerry Quinn <jlquinn@gcc.gnu.org>
Tue, 1 Jul 2003 02:55:20 +0000 (02:55 +0000)
2003-06-27  Jerry Quinn  <jlquinn@optonline.net>

* src/locale.cc (__use_cache<numpunct>): Move from here ...
* include/bits/locale_facets.tcc (__use_cache<numpunct>): To
here.

From-SVN: r68756

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

index 731de3114b2980461461a99896f52a710846221c..7b5eea6d24760372f99128efa094f4f0683b7600 100644 (file)
@@ -1,3 +1,9 @@
+2003-06-27  Jerry Quinn  <jlquinn@optonline.net>
+
+       * src/locale.cc (__use_cache<numpunct>): Move from here ...
+       * include/bits/locale_facets.tcc (__use_cache<numpunct>): To
+       here.
+
 2003-06-30  Paolo Carlini  <pcarlini@unitus.it>
 
        * include/bits/stl_algobase.h: Fully qualify standard
index aca0e056d6739e6d03ef78ccf83e42d8f2296d5b..6a3881652d2f9f3ccc5f20fbbbc65ebbdef246dd 100644 (file)
@@ -93,13 +93,35 @@ namespace std
     __use_cache(const locale& __loc);
 
   template<>
-    const __numpunct_cache<char>&
-    __use_cache(const locale& __loc);
+    inline const __numpunct_cache<char>&
+    __use_cache(const locale& __loc)
+    {
+      size_t __i = numpunct<char>::id._M_id();
+      const locale::facet** __caches = __loc._M_impl->_M_caches;
+      if (!__caches[__i])
+       {
+         __numpunct_cache<char>* __tmp = new __numpunct_cache<char>;
+         __tmp->_M_cache(__loc);
+         __loc._M_impl->_M_install_cache(__tmp, __i);
+       }
+      return static_cast<const __numpunct_cache<char>&>(*__caches[__i]);
+    }
 
 #ifdef _GLIBCPP_USE_WCHAR_T
   template<>
-    const __numpunct_cache<wchar_t>&
-    __use_cache(const locale& __loc);
+    inline const __numpunct_cache<wchar_t>&
+    __use_cache(const locale& __loc)
+    {
+      size_t __i = numpunct<wchar_t>::id._M_id();
+      const locale::facet** __caches = __loc._M_impl->_M_caches;
+      if (!__caches[__i])
+       {
+         __numpunct_cache<wchar_t>* __tmp = new __numpunct_cache<wchar_t>;
+         __tmp->_M_cache(__loc);
+         __loc._M_impl->_M_install_cache(__tmp, __i);
+       }
+      return static_cast<const __numpunct_cache<wchar_t>&>(*__caches[__i]);
+    }
 #endif
 
   // Stage 1: Determine a conversion specifier.
index 7788a58419d21d08ddb0462c21744645e04bdfad..8cb89e5677288090fe3bf5f770de2fa6c8860ccb 100644 (file)
@@ -449,38 +449,6 @@ namespace std
   locale::facet::
   ~facet() { }
 
-  template<>
-    const __numpunct_cache<char>&
-    __use_cache(const locale& __loc)
-    {
-      size_t __i = numpunct<char>::id._M_id();
-      const locale::facet** __caches = __loc._M_impl->_M_caches;
-      if (!__caches[__i])
-       {
-         __numpunct_cache<char>* __tmp = new __numpunct_cache<char>;
-         __tmp->_M_cache(__loc);
-         __loc._M_impl->_M_install_cache(__tmp, __i);
-       }
-      return static_cast<const __numpunct_cache<char>&>(*__caches[__i]);
-    }
-
-#ifdef _GLIBCPP_USE_WCHAR_T
-  template<>
-    const __numpunct_cache<wchar_t>&
-    __use_cache(const locale& __loc)
-    {
-      size_t __i = numpunct<wchar_t>::id._M_id();
-      const locale::facet** __caches = __loc._M_impl->_M_caches;
-      if (!__caches[__i])
-       {
-         __numpunct_cache<wchar_t>* __tmp = new __numpunct_cache<wchar_t>;
-         __tmp->_M_cache(__loc);
-         __loc._M_impl->_M_install_cache(__tmp, __i);
-       }
-      return static_cast<const __numpunct_cache<wchar_t>&>(*__caches[__i]);
-    }
-#endif
-
   // Definitions for static const data members of time_base
   template<> 
     const char*