locale_facets.tcc (numpunct::_M_cache): Avoid calling virtual functions twice.
authorJonathan Wakely <jwakely@redhat.com>
Wed, 10 Dec 2014 00:21:37 +0000 (00:21 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 10 Dec 2014 00:21:37 +0000 (00:21 +0000)
commitd6f64424aa37b52776f4f24ba4f534bf915aa3a8
treef8b50d7188a471a871b353a5814e16004c69959a
parent9c53a5b42371bbdfab2dac2f6e586762a549e931
locale_facets.tcc (numpunct::_M_cache): Avoid calling virtual functions twice.

* include/bits/locale_facets.tcc (numpunct::_M_cache): Avoid calling
virtual functions twice. Only update _M_allocated after all
allocations have succeeded.
* include/bits/locale_facets_nonio.tcc (moneypunct::_M_cache):
Likewise.
* include/bits/locale_facets_nonio.h (__timepunct::_M_cache): Remove
unused declaration.

From-SVN: r218552
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/locale_facets.tcc
libstdc++-v3/include/bits/locale_facets_nonio.h
libstdc++-v3/include/bits/locale_facets_nonio.tcc