mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Fix several places that called mapped_iterator's constructor without
passing in a function object. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57615 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b382c4dc23
commit
3d4227bec5
@ -73,6 +73,7 @@ public:
|
||||
typedef mapped_iterator<RootIt, UnaryFunc> _Self;
|
||||
|
||||
inline const RootIt &getCurrent() const { return current; }
|
||||
inline const UnaryFunc &getFunc() const { return Fn; }
|
||||
|
||||
inline explicit mapped_iterator(const RootIt &I, UnaryFunc F)
|
||||
: current(I), Fn(F) {}
|
||||
@ -87,9 +88,13 @@ public:
|
||||
_Self& operator--() { --current; return *this; }
|
||||
_Self operator++(int) { _Self __tmp = *this; ++current; return __tmp; }
|
||||
_Self operator--(int) { _Self __tmp = *this; --current; return __tmp; }
|
||||
_Self operator+ (difference_type n) const { return _Self(current + n); }
|
||||
_Self operator+ (difference_type n) const {
|
||||
return _Self(current + n, Fn);
|
||||
}
|
||||
_Self& operator+= (difference_type n) { current += n; return *this; }
|
||||
_Self operator- (difference_type n) const { return _Self(current - n); }
|
||||
_Self operator- (difference_type n) const {
|
||||
return _Self(current - n, Fn);
|
||||
}
|
||||
_Self& operator-= (difference_type n) { current -= n; return *this; }
|
||||
reference operator[](difference_type n) const { return *(*this + n); }
|
||||
|
||||
@ -106,7 +111,7 @@ template <class _Iterator, class Func>
|
||||
inline mapped_iterator<_Iterator, Func>
|
||||
operator+(typename mapped_iterator<_Iterator, Func>::difference_type N,
|
||||
const mapped_iterator<_Iterator, Func>& X) {
|
||||
return mapped_iterator<_Iterator, Func>(X.getCurrent() - N);
|
||||
return mapped_iterator<_Iterator, Func>(X.getCurrent() - N, X.getFunc());
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user