diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2018-07-21 16:18:28 +0900 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-21 14:49:18 +0200 |
commit | e469ab0d9eb02a05b1d12a7a0a6b6ed0e5977f1c (patch) | |
tree | 0b91650b7a9f1a89be0c562a72dba8830f40294c /sc | |
parent | 387f4b1e63fabb486d404ec7a47604aec1c9a75c (diff) |
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@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/rangelst.cxx | 14 |
1 files changed, 1 insertions, 13 deletions
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 |