typedef.
(time_get): Likewise. Fix comments.
+ * src/c++98/locale_init.cc (locale::_Impl::_Impl(size_t)): Use
+ new-initializer instead of loop.
+ * src/c++98/localename.cc (locale::_Impl::_Impl(const char*, size_t)):
+ Likewise.
+
2014-11-26 Jonathan Wakely <jwakely@redhat.com>
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
: _M_refcount(__refs), _M_facets(0), _M_facets_size(_GLIBCXX_NUM_FACETS),
_M_caches(0), _M_names(0)
{
- _M_facets = new (&facet_vec) const facet*[_M_facets_size];
- _M_caches = new (&cache_vec) const facet*[_M_facets_size];
- for (size_t __i = 0; __i < _M_facets_size; ++__i)
- _M_facets[__i] = _M_caches[__i] = 0;
+ _M_facets = new (&facet_vec) const facet*[_M_facets_size]();
+ _M_caches = new (&cache_vec) const facet*[_M_facets_size]();
// Name the categories.
- _M_names = new (&name_vec) char*[_S_categories_size];
+ _M_names = new (&name_vec) char*[_S_categories_size]();
_M_names[0] = new (&name_c[0]) char[2];
std::memcpy(_M_names[0], locale::facet::_S_get_c_name(), 2);
- for (size_t __j = 1; __j < _S_categories_size; ++__j)
- _M_names[__j] = 0;
// This is needed as presently the C++ version of "C" locales
// != data in the underlying locale model for __timepunct,
__try
{
- _M_facets = new const facet*[_M_facets_size];
- for (size_t __i = 0; __i < _M_facets_size; ++__i)
- _M_facets[__i] = 0;
- _M_caches = new const facet*[_M_facets_size];
- for (size_t __j = 0; __j < _M_facets_size; ++__j)
- _M_caches[__j] = 0;
- _M_names = new char*[_S_categories_size];
- for (size_t __k = 0; __k < _S_categories_size; ++__k)
- _M_names[__k] = 0;
+ _M_facets = new const facet*[_M_facets_size]();
+ _M_caches = new const facet*[_M_facets_size]();
+ _M_names = new char*[_S_categories_size]();
// Name the categories.
const char* __smon = __s;