Skip to content

Commit

Permalink
Rename member field according to the style guide.
Browse files Browse the repository at this point in the history
  • Loading branch information
paveljanik committed Jul 15, 2017
1 parent afd2fca commit 4d4fb33
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/reverse_iterator.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Taken from https://gist.github.com/arvidsson/7231973

#ifndef BITCOIN_REVERSE_ITERATOR_HPP
#define BITCOIN_REVERSE_ITERATOR_HPP
#ifndef BITCOIN_REVERSE_ITERATOR_H
#define BITCOIN_REVERSE_ITERATOR_H

/**
* Template used for reverse iteration in C++11 range-based for loops.
Expand All @@ -14,19 +14,19 @@
template <typename T>
class reverse_range
{
T &x;
T &m_x;

public:
reverse_range(T &x) : x(x) {}
reverse_range(T &x) : m_x(x) {}

auto begin() const -> decltype(this->x.rbegin())
auto begin() const -> decltype(this->m_x.rbegin())
{
return x.rbegin();
return m_x.rbegin();
}

auto end() const -> decltype(this->x.rend())
auto end() const -> decltype(this->m_x.rend())
{
return x.rend();
return m_x.rend();
}
};

Expand All @@ -36,4 +36,4 @@ reverse_range<T> reverse_iterate(T &x)
return reverse_range<T>(x);
}

#endif // BITCOIN_REVERSE_ITERATOR_HPP
#endif // BITCOIN_REVERSE_ITERATOR_H

0 comments on commit 4d4fb33

Please sign in to comment.