@@ -102,45 +102,41 @@ class TimeSpline {
102102 }
103103
104104 // Copyable, Movable.
105- IteratorT<SplineType, NodeType>(
106- const IteratorT<SplineType, NodeType>& other) = default ;
107- IteratorT<SplineType, NodeType>& operator =(
108- const IteratorT<SplineType, NodeType>& other) = default ;
109- IteratorT<SplineType, NodeType>(IteratorT<SplineType, NodeType>&& other) =
110- default ;
111- IteratorT<SplineType, NodeType>& operator =(
112- IteratorT<SplineType, NodeType>&& other) = default ;
105+ IteratorT (const IteratorT& other) = default ;
106+ IteratorT& operator =(const IteratorT& other) = default ;
107+ IteratorT (IteratorT&& other) = default ;
108+ IteratorT& operator =(IteratorT&& other) = default ;
113109
114110 reference operator *() { return node_; }
115111
116112 pointer operator ->() { return &node_; }
117113 pointer operator ->() const { return &node_; }
118114
119- IteratorT<SplineType, NodeType> & operator ++() {
115+ IteratorT& operator ++() {
120116 ++index_;
121117 node_ = index_ == spline_->Size () ? NodeType () : spline_->NodeAt (index_);
122118 return *this ;
123119 }
124120
125- IteratorT<SplineType, NodeType> operator ++(int ) {
126- IteratorT<SplineType, NodeType> tmp = *this ;
121+ IteratorT operator ++(int ) {
122+ IteratorT tmp = *this ;
127123 ++(*this );
128124 return tmp;
129125 }
130126
131- IteratorT<SplineType, NodeType> & operator --() {
127+ IteratorT& operator --() {
132128 --index_;
133129 node_ = spline_->NodeAt (index_);
134130 return *this ;
135131 }
136132
137- IteratorT<SplineType, NodeType> operator --(int ) {
138- IteratorT<SplineType, NodeType> tmp = *this ;
133+ IteratorT operator --(int ) {
134+ IteratorT tmp = *this ;
139135 --(*this );
140136 return tmp;
141137 }
142138
143- IteratorT<SplineType, NodeType> & operator +=(difference_type n) {
139+ IteratorT& operator +=(difference_type n) {
144140 if (n != 0 ) {
145141 index_ += n;
146142 node_ =
@@ -149,29 +145,25 @@ class TimeSpline {
149145 return *this ;
150146 }
151147
152- IteratorT<SplineType, NodeType>& operator -=(difference_type n) {
153- return *this += -n;
154- }
148+ IteratorT& operator -=(difference_type n) { return *this += -n; }
155149
156- IteratorT<SplineType, NodeType> operator +(difference_type n) const {
157- IteratorT<SplineType, NodeType> tmp (*this );
150+ IteratorT operator +(difference_type n) const {
151+ IteratorT tmp (*this );
158152 tmp += n;
159153 return tmp;
160154 }
161155
162- IteratorT<SplineType, NodeType> operator -(difference_type n) const {
163- IteratorT<SplineType, NodeType> tmp (*this );
156+ IteratorT operator -(difference_type n) const {
157+ IteratorT tmp (*this );
164158 tmp -= n;
165159 return tmp;
166160 }
167161
168- friend IteratorT<SplineType, NodeType> operator +(
169- difference_type n, const IteratorT<SplineType, NodeType>& it) {
162+ friend IteratorT operator +(difference_type n, const IteratorT& it) {
170163 return it + n;
171164 }
172165
173- friend difference_type operator -(const IteratorT<SplineType, NodeType>& x,
174- const IteratorT<SplineType, NodeType>& y) {
166+ friend difference_type operator -(const IteratorT& x, const IteratorT& y) {
175167 CHECK_EQ (x.spline_ , y.spline_ )
176168 << " Comparing iterators from different splines" ;
177169 if (x != y) return (x.index_ - y.index_ );
@@ -180,35 +172,29 @@ class TimeSpline {
180172
181173 NodeType operator [](difference_type n) const { return *(*this + n); }
182174
183- friend bool operator ==(const IteratorT<SplineType, NodeType>& x,
184- const IteratorT<SplineType, NodeType>& y) {
175+ friend bool operator ==(const IteratorT& x, const IteratorT& y) {
185176 return x.spline_ == y.spline_ && x.index_ == y.index_ ;
186177 }
187178
188- friend bool operator !=(const IteratorT<SplineType, NodeType>& x,
189- const IteratorT<SplineType, NodeType>& y) {
179+ friend bool operator !=(const IteratorT& x, const IteratorT& y) {
190180 return !(x == y);
191181 }
192182
193- friend bool operator <(const IteratorT<SplineType, NodeType>& x,
194- const IteratorT<SplineType, NodeType>& y) {
183+ friend bool operator <(const IteratorT& x, const IteratorT& y) {
195184 CHECK_EQ (x.spline_ , y.spline_ )
196185 << " Comparing iterators from different splines" ;
197186 return x.index_ < y.index_ ;
198187 }
199188
200- friend bool operator >(const IteratorT<SplineType, NodeType>& x,
201- const IteratorT<SplineType, NodeType>& y) {
189+ friend bool operator >(const IteratorT& x, const IteratorT& y) {
202190 return y < x;
203191 }
204192
205- friend bool operator <=(const IteratorT<SplineType, NodeType>& x,
206- const IteratorT<SplineType, NodeType>& y) {
193+ friend bool operator <=(const IteratorT& x, const IteratorT& y) {
207194 return !(y < x);
208195 }
209196
210- friend bool operator >=(const IteratorT<SplineType, NodeType>& x,
211- const IteratorT<SplineType, NodeType>& y) {
197+ friend bool operator >=(const IteratorT& x, const IteratorT& y) {
212198 return !(x < y);
213199 }
214200
0 commit comments