File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 1
1
// Taken from https://gist.github.com/arvidsson/7231973
2
2
3
- #ifndef BITCOIN_REVERSE_ITERATOR_HPP
4
- #define BITCOIN_REVERSE_ITERATOR_HPP
3
+ #ifndef BITCOIN_REVERSE_ITERATOR_H
4
+ #define BITCOIN_REVERSE_ITERATOR_H
5
5
6
6
/* *
7
7
* Template used for reverse iteration in C++11 range-based for loops.
14
14
template <typename T>
15
15
class reverse_range
16
16
{
17
- T &x ;
17
+ T &m_x ;
18
18
19
19
public:
20
- reverse_range (T &x) : x (x) {}
20
+ reverse_range (T &x) : m_x (x) {}
21
21
22
- auto begin () const -> decltype(this ->x .rbegin())
22
+ auto begin () const -> decltype(this ->m_x .rbegin())
23
23
{
24
- return x .rbegin ();
24
+ return m_x .rbegin ();
25
25
}
26
26
27
- auto end () const -> decltype(this ->x .rend())
27
+ auto end () const -> decltype(this ->m_x .rend())
28
28
{
29
- return x .rend ();
29
+ return m_x .rend ();
30
30
}
31
31
};
32
32
@@ -36,4 +36,4 @@ reverse_range<T> reverse_iterate(T &x)
36
36
return reverse_range<T>(x);
37
37
}
38
38
39
- #endif // BITCOIN_REVERSE_ITERATOR_HPP
39
+ #endif // BITCOIN_REVERSE_ITERATOR_H
You can’t perform that action at this time.
0 commit comments