]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
localename.cc (_M_replace_categories, [...]): Const-ify a couple of variables.
authorPaolo Carlini <pcarlini@unitus.it>
Tue, 14 Oct 2003 14:56:29 +0000 (16:56 +0200)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 14 Oct 2003 14:56:29 +0000 (14:56 +0000)
2003-10-14  Paolo Carlini  <pcarlini@unitus.it>

* src/localename.cc (_M_replace_categories, M_replace_facet):
Const-ify a couple of variables.

From-SVN: r72472

libstdc++-v3/ChangeLog
libstdc++-v3/src/localename.cc

index d024c0e59cd8bf505570c2715310cfeae970a127..b5381140aace417f867b2841d2d62e9b2d865e4f 100644 (file)
@@ -1,3 +1,8 @@
+2003-10-14  Paolo Carlini  <pcarlini@unitus.it>
+
+       * src/localename.cc (_M_replace_categories, M_replace_facet):
+       Const-ify a couple of variables.
+
 2003-10-14  Petur Runolfsson  <peturr02@ru.is>
            Andreas Tobler  <a.tobler@schweiz.ch>
 
index ba90ca4b5c448603384832f489af784a31350546..56b2bdfe102f1aef72bca30bb630facb2ce4cc46 100644 (file)
@@ -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]);