From: redi Date: Mon, 17 Dec 2007 22:07:39 +0000 (+0000) Subject: 2007-12-17 Jonathan Wakely X-Git-Tag: upstream/4.9.2~44486 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c50d786286fbd0533152672d2f15d68a3913f129;p=platform%2Fupstream%2Flinaro-gcc.git 2007-12-17 Jonathan Wakely * include/bits/locale_classes.h: Simplify RTTI checks. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131020 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 3fc2fd2..e8a0c70 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,9 @@ 2007-12-17 Jonathan Wakely + * include/bits/locale_classes.h: Simplify RTTI checks. + +2007-12-17 Jonathan Wakely + * docs/html/test.html: Fix paths and notes on running subset of tests. * docs/html/ext/parallel_mode.html: Fix markup typos. * docs/html/ext/pb_ds/index.html: Likewise. diff --git a/libstdc++-v3/include/bits/locale_classes.h b/libstdc++-v3/include/bits/locale_classes.h index 4eee862..0264236 100644 --- a/libstdc++-v3/include/bits/locale_classes.h +++ b/libstdc++-v3/include/bits/locale_classes.h @@ -579,17 +579,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { const size_t __i = _Facet::id._M_id(); const locale::facet** __facets = __loc._M_impl->_M_facets; - bool __b(false); - try - { - if (__i < __loc._M_impl->_M_facets_size - && dynamic_cast(__facets[__i]) != NULL) - __b = true; - - } - catch (...) - { } - return __b; + return __i < __loc._M_impl->_M_facets_size + && dynamic_cast(__facets[__i]) != NULL; } /** @@ -611,8 +602,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { const size_t __i = _Facet::id._M_id(); const locale::facet** __facets = __loc._M_impl->_M_facets; - if (__i >= __loc._M_impl->_M_facets_size - || dynamic_cast(__facets[__i]) == NULL) + if (__i >= __loc._M_impl->_M_facets_size || __facets[__i] == NULL) __throw_bad_cast(); return dynamic_cast(*__facets[__i]); }