diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-12 17:02:08 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-12 17:02:08 +0000 |
commit | 5c76831e860471e0783e43c741682288e748a960 (patch) | |
tree | b10bbc00ff5a3a832933b613202d82eed4ed43dc /libstdc++-v3/config/locale/generic/numeric_members.cc | |
parent | af58898575d8f271f250c86a7fce748639ce5a09 (diff) | |
download | ppe42-gcc-5c76831e860471e0783e43c741682288e748a960.tar.gz ppe42-gcc-5c76831e860471e0783e43c741682288e748a960.zip |
2004-01-12 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.h (struct __numpunct_cache):
Add members _M_truename_len and _M_falsename_len, caching
the lengths of _M_truename and _M_falsename.
(__numpunct_cache<>::_M_cache): Assign the latter.
* include/bits/locale_facets.tcc (num_get::do_get(bool&),
num_put::do_put(bool)): Use the new members, thus avoiding
computing string lengths again and again.
* config/locale/generic/numeric_members.cc
(numpunct<>::_M_initialize_numpunct): Assign the new members.
* config/locale/gnu/numeric_members.cc
(numpunct<>::_M_initialize_numpunct): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75735 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/config/locale/generic/numeric_members.cc')
-rw-r--r-- | libstdc++-v3/config/locale/generic/numeric_members.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libstdc++-v3/config/locale/generic/numeric_members.cc b/libstdc++-v3/config/locale/generic/numeric_members.cc index 8af127b8644..72760aee0d0 100644 --- a/libstdc++-v3/config/locale/generic/numeric_members.cc +++ b/libstdc++-v3/config/locale/generic/numeric_members.cc @@ -58,7 +58,9 @@ namespace std _M_data->_M_atoms_in[__i] = __num_base::_S_atoms_in[__i]; _M_data->_M_truename = "true"; - _M_data->_M_falsename = "false"; + _M_data->_M_truename_len = strlen(_M_data->_M_truename); + _M_data->_M_falsename = "false"; + _M_data->_M_falsename_len = strlen(_M_data->_M_falsename); } template<> @@ -95,7 +97,9 @@ namespace std } _M_data->_M_truename = L"true"; + _M_data->_M_truename_len = wcslen(_M_data->_M_truename); _M_data->_M_falsename = L"false"; + _M_data->_M_falsename_len = wcslen(_M_data->_M_falsename); } template<> |