[Libreoffice-commits] core.git: sc/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sat Jul 21 12:49:39 UTC 2018
sc/source/core/tool/rangelst.cxx | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
New commits:
commit e469ab0d9eb02a05b1d12a7a0a6b6ed0e5977f1c
Author: Takeshi Abe <tabe at fixedpoint.jp>
AuthorDate: Sat Jul 21 16:18:28 2018 +0900
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Jul 21 14:49:18 2018 +0200
sc: Compare vectors by simpler code
Change-Id: I5efac4a449b388c2d8a6e47beb4a6a8fbfed909a
Reviewed-on: https://gerrit.libreoffice.org/57797
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx
index cd10b807bf18..b64af571067b 100644
--- a/sc/source/core/tool/rangelst.cxx
+++ b/sc/source/core/tool/rangelst.cxx
@@ -339,19 +339,7 @@ bool ScRangeList::operator==( const ScRangeList& r ) const
if ( this == &r )
return true;
- if (maRanges.size() != r.maRanges.size())
- return false;
-
- auto itr1 = maRanges.begin(), itrEnd = maRanges.end();
- auto itr2 = r.maRanges.begin();
- for (; itr1 != itrEnd; ++itr1, ++itr2)
- {
- const ScRange& r1 = *itr1;
- const ScRange& r2 = *itr2;
- if (r1 != r2)
- return false;
- }
- return true;
+ return maRanges == r.maRanges;
}
bool ScRangeList::operator!=( const ScRangeList& r ) const
More information about the Libreoffice-commits
mailing list