summaryrefslogtreecommitdiff
path: root/libstdc++-v3/src/localename.cc
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@redhat.com>2004-05-22 23:46:34 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2004-05-22 23:46:34 +0000
commit26c691a88b8a403e7a92ce049368cc7efe3567ce (patch)
tree4eb79935bc90f022040e5aed4af6bec9bdfa0b5f /libstdc++-v3/src/localename.cc
parentd6dc556b315b8e1b99922eda0319548ecb5233e9 (diff)
downloadgcc-26c691a88b8a403e7a92ce049368cc7efe3567ce.tar.gz
re PR libstdc++/12854 (libstdc++ vs. -Weffc++)
2004-05-22 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/12854 Fixups for -Weffc++. * include/bits/basic_string.h (basic_string::operator=): Return pointer to this instead of result of assign. Although redundant, this doesn't impact resultant codegen. * include/bits/locale_facets.h (__numpunct_cache): Declare assignment opxserator and copy constructor private. (__timepunct_cache): Same. (__moneypunct_cache): Same. (collate): Use member initialization list for _M_c_locale_collate. * config/locale/gnu/messages_members.h: Same. * config/locale/gnu/time_members.h (__timepunct): Same. * src/codecvt.cc: Use member initialization list to initialize _M_c_locale_codecvt. * src/ctype.cc: Same, with _M_c_locale_ctype and _M_narrow_ok. * config/os/gnu-linux/ctype_noninline.h: Same. * src/locale.cc (_Impl): Same. * src/locale_init.cc: Same. * src/localename.cc: Same. * include/bits/basic_ios.h (basic_ios): Complete member initialization list. * include/bits/istream.tcc (basic_istream::sentry): Same. * include/bits/ostream.tcc (basic_ostream::sentry): Same. * include/bits/fstream.tcc (basic_filebuf): Add _M_lock and _M_pback to member initialization list. * include/std/std_streambuf.h: Same. * include/std/std_sstream.h: Same, for _M_mode. * src/ios.cc (ios_base): Same. * include/ext/rope: Make derived classes match exception specifications. Add copy constructors and assignment operators. * include/debug/safe_base.h (_Safe_sequence_base): Declare copy constructor and assignment operator protected. (_Safe_iterator_base): Same. * include/debug/formatter.h (_Error_formatter): Define copy constructor and assignment operator. * include/backward/strstream: Declare assignment operator and copy constructor private. From-SVN: r82153
Diffstat (limited to 'libstdc++-v3/src/localename.cc')
-rw-r--r--libstdc++-v3/src/localename.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/libstdc++-v3/src/localename.cc b/libstdc++-v3/src/localename.cc
index 1600b2cc55b..e90e84734e8 100644
--- a/libstdc++-v3/src/localename.cc
+++ b/libstdc++-v3/src/localename.cc
@@ -34,7 +34,7 @@ namespace std
{
using namespace __gnu_cxx;
- locale::locale(const char* __s)
+ locale::locale(const char* __s) : _M_impl(0)
{
if (__s)
{
@@ -148,6 +148,7 @@ namespace std
}
locale::locale(const locale& __base, const char* __s, category __cat)
+ : _M_impl(0)
{
// NB: There are complicated, yet more efficient ways to do
// this. Building up locales on a per-category way is tedious, so
@@ -157,6 +158,7 @@ namespace std
}
locale::locale(const locale& __base, const locale& __add, category __cat)
+ : _M_impl(0)
{ _M_coalesce(__base, __add, __cat); }
void
@@ -178,15 +180,14 @@ namespace std
// Construct named _Impl.
locale::_Impl::
_Impl(const char* __s, size_t __refs)
- : _M_refcount(__refs), _M_facets_size(_GLIBCXX_NUM_FACETS)
+ : _M_refcount(__refs), _M_facets(0), _M_facets_size(_GLIBCXX_NUM_FACETS),
+ _M_caches(0), _M_names(0)
{
// Initialize the underlying locale model, which also checks to
// see if the given name is valid.
__c_locale __cloc;
locale::facet::_S_create_c_locale(__cloc, __s);
- _M_facets = _M_caches = 0;
- _M_names = 0;
try
{
_M_facets = new const facet*[_M_facets_size];