From: Paolo Carlini Date: Tue, 14 Oct 2003 14:56:29 +0000 (+0200) Subject: localename.cc (_M_replace_categories, [...]): Const-ify a couple of variables. X-Git-Tag: releases/gcc-3.4.0~3034 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=42db0f21ef3a49067b8be50f129f8ad046f7a08e;p=thirdparty%2Fgcc.git localename.cc (_M_replace_categories, [...]): Const-ify a couple of variables. 2003-10-14 Paolo Carlini * src/localename.cc (_M_replace_categories, M_replace_facet): Const-ify a couple of variables. From-SVN: r72472 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index d024c0e59cd8..b5381140aace 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2003-10-14 Paolo Carlini + + * src/localename.cc (_M_replace_categories, M_replace_facet): + Const-ify a couple of variables. + 2003-10-14 Petur Runolfsson Andreas Tobler diff --git a/libstdc++-v3/src/localename.cc b/libstdc++-v3/src/localename.cc index ba90ca4b5c44..56b2bdfe102f 100644 --- a/libstdc++-v3/src/localename.cc +++ b/libstdc++-v3/src/localename.cc @@ -344,10 +344,9 @@ namespace std locale::_Impl:: _M_replace_categories(const _Impl* __imp, category __cat) { - category __mask; for (size_t __ix = 0; __ix < _S_categories_size; ++__ix) { - __mask = 1 << __ix; + const category __mask = 1 << __ix; if (__mask & __cat) { // Need to replace entry in _M_facets with other locale's info. @@ -377,7 +376,7 @@ namespace std locale::_Impl:: _M_replace_facet(const _Impl* __imp, const locale::id* __idp) { - size_t __index = __idp->_M_id(); + const size_t __index = __idp->_M_id(); if ((__index > (__imp->_M_facets_size - 1)) || !__imp->_M_facets[__index]) __throw_runtime_error("locale::_Impl::_M_replace_facet"); _M_install_facet(__idp, __imp->_M_facets[__index]);