forked from boostorg/algorithm
Small optimization of equal() functions.
[SVN r24185]
This commit is contained in:
1 parent
67f7273ab3
commit
4c0efd3d1a
1 file changed
+8
-2
@@ -136,7 +136,10 @@ namespace boost {
|
|||||||
// comparison
|
// comparison
|
||||||
bool equal( const find_iterator& Other ) const
|
bool equal( const find_iterator& Other ) const
|
||||||
{
|
{
|
||||||
return eof() || Other.eof() ? eof() == Other.eof() :
|
bool bEof=eof();
|
||||||
|
bool bOtherEof=Other.eof();
|
||||||
|
|
||||||
|
return bEof || bOtherEof ? bEof==bOtherEof :
|
||||||
(
|
(
|
||||||
m_Match==Other.m_Match &&
|
m_Match==Other.m_Match &&
|
||||||
m_End==Other.m_End
|
m_End==Other.m_End
|
||||||
@@ -297,7 +300,10 @@ namespace boost {
|
|||||||
// comparison
|
// comparison
|
||||||
bool equal( const split_iterator& Other ) const
|
bool equal( const split_iterator& Other ) const
|
||||||
{
|
{
|
||||||
return eof() || Other.eof() ? eof() == Other.eof() :
|
bool bEof=eof();
|
||||||
|
bool bOtherEof=Other.eof();
|
||||||
|
|
||||||
|
return bEof || bOtherEof ? bEof==bOtherEof :
|
||||||
(
|
(
|
||||||
m_Match==Other.m_Match &&
|
m_Match==Other.m_Match &&
|
||||||
m_Next==Other.m_Next &&
|
m_Next==Other.m_Next &&
|
||||||
|
|||||||
Reference in new issue
Block a user