From e78731fe871ede8cc4013c0614de8cfd94a32972 Mon Sep 17 00:00:00 2001
From: paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Sat, 4 Oct 2003 14:59:32 +0000
Subject: [PATCH] 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++.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72093 138bc75d-0d04-0410-961f-82ee72b054a4
---
 libstdc++-v3/ChangeLog                      | 7 +++++++
 libstdc++-v3/include/bits/locale_facets.tcc | 7 ++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 7a951fe9afdd..e28653028b1c 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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>
 
diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc
index ad5c59bf9b46..0503c70d99ce 100644
--- a/libstdc++-v3/include/bits/locale_facets.tcc
+++ b/libstdc++-v3/include/bits/locale_facets.tcc
@@ -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]);
-- 
GitLab