This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[v3] Tidy a bit _Bit_iterator_base::_M_incr


Hi,

tested x86-linux, committed to mainline.

Paolo.

/////////////////
2006-08-10  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/stl_bvector.h (_Bit_iterator_base::_M_incr(ptrdiff_t)):
	Tidy a bit, thus reducing generated code size.
Index: include/bits/stl_bvector.h
===================================================================
--- include/bits/stl_bvector.h	(revision 116049)
+++ include/bits/stl_bvector.h	(working copy)
@@ -144,11 +144,10 @@
       __n = __n % int(_S_word_bit);
       if (__n < 0)
 	{
-	  _M_offset = static_cast<unsigned int>(__n + int(_S_word_bit));
+	  __n += int(_S_word_bit);
 	  --_M_p;
 	}
-      else
-	_M_offset = static_cast<unsigned int>(__n);
+      _M_offset = static_cast<unsigned int>(__n);
     }
 
     bool

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]