Skip to content

Commit 8ef96ff

Browse files
committed
avoid repetition of type in return statements
1 parent 480e257 commit 8ef96ff

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/RangeMap.hpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class RangeMap {
8282
}
8383

8484
std::pair<uint32_t,uint32_t> operator * () const {
85-
return std::pair<uint32_t,uint32_t>(_currentKey, _rangeMap.valueAt(_currentKey));
85+
return {_currentKey, _rangeMap.valueAt(_currentKey)};
8686
}
8787

8888
bool operator == (const Iterator &it) const {
@@ -122,14 +122,13 @@ class RangeMap {
122122
bool empty () const {return _ranges.empty();}
123123
void clear () {_ranges.clear();}
124124
const Range& getRange (size_t n) const {return _ranges[n];}
125-
Iterator begin () const {return Iterator(*this, _ranges.begin());}
126-
Iterator end () const {return Iterator(*this, _ranges.end());}
125+
Iterator begin () const {return {*this, _ranges.begin()};}
126+
Iterator end () const {return {*this, _ranges.end()};}
127127
std::ostream& write (std::ostream &os) const;
128128

129129
protected:
130130
void adaptNeighbors (Ranges::iterator it);
131131
int lookup (uint32_t c) const;
132-
const Range& rangeAt (size_t n) const {return _ranges[n];}
133132

134133
private:
135134
Ranges _ranges;

0 commit comments

Comments
 (0)