Commit 238e3a40 by Benjamin Kosnik Committed by Benjamin Kosnik

locale_init.cc (locale::_S_initialize_once): Move construction of classic locale...

2009-01-06  Benjamin Kosnik  <bkoz@redhat.com>

	* src/locale_init.cc (locale::_S_initialize_once): Move construction
	of classic locale...
	(locale::classic): Here.

From-SVN: r143149
parent 246cb5be
2009-01-06 Benjamin Kosnik <bkoz@redhat.com>
* src/locale_init.cc (locale::_S_initialize_once): Move construction
of classic locale...
(locale::classic): Here.
2009-01-06 Jonathan Wakely <jwakely.gcc@gmail.com> 2009-01-06 Jonathan Wakely <jwakely.gcc@gmail.com>
* include/tr1_impl/regex: Fix bad return statements and typos. * include/tr1_impl/regex: Fix bad return statements and typos.
......
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
// 2009
// Free Software Foundation, Inc. // Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -244,7 +245,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -244,7 +245,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
locale::classic() locale::classic()
{ {
_S_initialize(); _S_initialize();
return reinterpret_cast<const locale&>(c_locale); return *(new (&c_locale) locale(_S_classic));
} }
void void
...@@ -254,7 +255,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -254,7 +255,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// One reference for _S_classic, one for _S_global // One reference for _S_classic, one for _S_global
_S_classic = new (&c_locale_impl) _Impl(2); _S_classic = new (&c_locale_impl) _Impl(2);
_S_global = _S_classic; _S_global = _S_classic;
new (&c_locale) locale(_S_classic);
} }
void void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment