[Libreoffice-commits] core.git: sc/inc
Michael Stahl
mstahl at redhat.com
Mon Jan 22 11:49:15 UTC 2018
sc/inc/table.hxx | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
New commits:
commit d26ba19006596d7e97e68dfcca38305c4fc1700f
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Jan 19 21:11:49 2018 +0100
sc: std::iterator is deprecated in C++17
Change-Id: I947dcf61e95bdc68d19eab7daca4c31ba8047d5e
Reviewed-on: https://gerrit.libreoffice.org/48224
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 12a961b59a59..8f84fd475782 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -121,15 +121,16 @@ struct ScInterpreterContext;
class ScColumnsRange final
{
public:
- class Iterator final : public std::iterator<
- std::input_iterator_tag, // iterator_category
- SCCOL, // value_type
- SCCOL, // difference_type
- const SCCOL*, // pointer
- SCCOL> // reference
+ class Iterator final
{
std::vector<ScColumn*>::const_iterator maColIter;
public:
+ typedef std::input_iterator_tag iterator_category;
+ typedef SCCOL value_type;
+ typedef SCCOL difference_type;
+ typedef const SCCOL* pointer;
+ typedef SCCOL reference;
+
explicit Iterator(std::vector<ScColumn*>::const_iterator colIter) : maColIter(colIter) {}
Iterator& operator++() { maColIter++; return *this;}
@@ -137,7 +138,7 @@ class ScColumnsRange final
bool operator==(Iterator other) const {return maColIter == other.maColIter;}
bool operator!=(Iterator other) const {return !(*this == other);}
- reference operator*() const {return (*maColIter)->GetCol();}
+ SCCOL operator*() const {return (*maColIter)->GetCol();}
};
ScColumnsRange(Iterator nBegin, Iterator nEnd) : maBegin(nBegin), maEnd(nEnd) {}
More information about the Libreoffice-commits
mailing list