Skip to content

Commit ad2449f

Browse files
[BOLT] Remove duplicate types (NFC)
This patch, a follow-up for 588628d, removes duplicate types like T and PointerT in favor of reference and pointer, respectively.
1 parent edbf36c commit ad2449f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

bolt/include/bolt/Core/BinaryContext.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,6 @@ template <typename ItrType,
107107
class FilterIterator {
108108
using inner_traits = std::iterator_traits<ItrType>;
109109
using Iterator = FilterIterator;
110-
using T = typename std::iterator_traits<ItrType>::reference;
111-
using PointerT = typename std::iterator_traits<ItrType>::pointer;
112110

113111
PredType Pred;
114112
ItrType Itr, End;
@@ -139,8 +137,8 @@ class FilterIterator {
139137
Iterator operator--(int) { auto Tmp(Itr); prev(); return Tmp; }
140138
bool operator==(const Iterator &Other) const { return Itr == Other.Itr; }
141139
bool operator!=(const Iterator &Other) const { return !operator==(Other); }
142-
T operator*() { return *Itr; }
143-
PointerT operator->() { return &operator*(); }
140+
reference operator*() { return *Itr; }
141+
pointer operator->() { return &operator*(); }
144142
FilterIterator(PredType Pred, ItrType Itr, ItrType End)
145143
: Pred(Pred), Itr(Itr), End(End) {
146144
nextMatching();

0 commit comments

Comments
 (0)