]> gcc.gnu.org Git - gcc.git/commitdiff
locale_facets.tcc (num_get::_M_extract_float): Constify a couple of variables.
authorPaolo Carlini <pcarlini@unitus.it>
Sat, 4 Oct 2003 14:59:32 +0000 (16:59 +0200)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sat, 4 Oct 2003 14:59:32 +0000 (14:59 +0000)
2003-10-04  Paolo Carlini  <pcarlini@unitus.it>

* include/bits/locale_facets.tcc (num_get::_M_extract_float):
Constify a couple of variables.
(num_get::do_get(..., bool&)): Constify __c; prefer *__beg,
++__beg to *__beg++.

From-SVN: r72093

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/locale_facets.tcc

index 7a951fe9afdde8b542f8c36139a202860ca43136..e28653028b1c27fb9bd0f1654bd64e2a5ac6d8f2 100644 (file)
@@ -1,3 +1,10 @@
+2003-10-04  Paolo Carlini  <pcarlini@unitus.it>
+
+       * include/bits/locale_facets.tcc (num_get::_M_extract_float):
+       Constify a couple of variables.
+       (num_get::do_get(..., bool&)): Constify __c; prefer *__beg,
+       ++__beg to *__beg++.
+
 2003-10-04  Paolo Carlini  <pcarlini@unitus.it>
             Petur Runolfsson  <peturr02@ru.is>
 
index ad5c59bf9b46f97057c8e70bbf7a8021eb62d014..0503c70d99ce35803d1631718fa7eab1ddb4acce 100644 (file)
@@ -146,7 +146,7 @@ namespace std
       // First check for sign.
       int __pos = 0;
       char_type  __c = *__beg;
-      bool __plus = __traits_type::eq(__c, __lit[_S_iplus]);
+      const bool __plus = __traits_type::eq(__c, __lit[_S_iplus]);
       if ((__plus || __traits_type::eq(__c, __lit[_S_iminus])) 
          && __beg != __end)
        {
@@ -230,7 +230,7 @@ namespace std
              __c = *(++__beg);
 
              // Remove optional plus or minus sign, if they exist.
-             bool __plus = __traits_type::eq(__c, __lit[_S_iplus]);
+             const bool __plus = __traits_type::eq(__c, __lit[_S_iplus]);
              if (__plus || __traits_type::eq(__c, __lit[_S_iminus]))
                {
                  ++__pos;
@@ -453,7 +453,8 @@ namespace std
          bool __testt = false;
           for (size_t __n = 0; __beg != __end; ++__n)
             {
-              char_type __c = *__beg++;
+              const char_type __c = *__beg;
+             ++__beg;
 
              if (__n <= __fn)
                __testf = __traits_type::eq(__c, __lc->_M_falsename[__n]);
This page took 0.07779 seconds and 5 git commands to generate.