locale.cc (__use_cache<numpunct>): Move from here ...
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
This commit is contained in:
parent
de1f565924
commit
cf0cad0951
|
@ -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>
|
2003-06-30 Paolo Carlini <pcarlini@unitus.it>
|
||||||
|
|
||||||
* include/bits/stl_algobase.h: Fully qualify standard
|
* include/bits/stl_algobase.h: Fully qualify standard
|
||||||
|
|
|
@ -93,13 +93,35 @@ namespace std
|
||||||
__use_cache(const locale& __loc);
|
__use_cache(const locale& __loc);
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
const __numpunct_cache<char>&
|
inline const __numpunct_cache<char>&
|
||||||
__use_cache(const locale& __loc);
|
__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
|
#ifdef _GLIBCPP_USE_WCHAR_T
|
||||||
template<>
|
template<>
|
||||||
const __numpunct_cache<wchar_t>&
|
inline const __numpunct_cache<wchar_t>&
|
||||||
__use_cache(const locale& __loc);
|
__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
|
#endif
|
||||||
|
|
||||||
// Stage 1: Determine a conversion specifier.
|
// Stage 1: Determine a conversion specifier.
|
||||||
|
|
|
@ -449,38 +449,6 @@ namespace std
|
||||||
locale::facet::
|
locale::facet::
|
||||||
~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
|
// Definitions for static const data members of time_base
|
||||||
template<>
|
template<>
|
||||||
const char*
|
const char*
|
||||||
|
|
Loading…
Reference in New Issue