aboutsummaryrefslogtreecommitdiff
path: root/src/reverse_iterator.h
diff options
context:
space:
mode:
authorJoão Barbosa <joao.paulo.barbosa@gmail.com>2018-07-24 16:59:49 +0100
committerJoão Barbosa <joao.paulo.barbosa@gmail.com>2018-07-24 20:46:23 +0100
commit12dd1013454a3b4913e8e6bbac251887e7e82ff0 (patch)
tree74edb97303620fd3ce9db676ab0c8f5664c81e58 /src/reverse_iterator.h
parent5f7575e2636413b7d220088e8b7aca6f0d0a5cc2 (diff)
scripted-diff: Remove trailing whitespaces
-BEGIN VERIFY SCRIPT- sed --in-place'' --regexp-extended 's/[[:space:]]+$//g' $(git grep -I --files-with-matches --extended-regexp '[[:space:]]+$' -- src test ':!*.svg' ':!src/crypto/sha256_sse4*' ':!src/leveldb' ':!src/qt/locale' ':!src/secp256k1' ':!src/univalue') -END VERIFY SCRIPT-
Diffstat (limited to 'src/reverse_iterator.h')
-rw-r--r--src/reverse_iterator.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/reverse_iterator.h b/src/reverse_iterator.h
index ab467f07c9..729d8c11cc 100644
--- a/src/reverse_iterator.h
+++ b/src/reverse_iterator.h
@@ -5,7 +5,7 @@
/**
* Template used for reverse iteration in C++11 range-based for loops.
- *
+ *
* std::vector<int> v = {1, 2, 3, 4, 5};
* for (auto x : reverse_iterate(v))
* std::cout << x << " ";
@@ -15,21 +15,21 @@ template <typename T>
class reverse_range
{
T &m_x;
-
+
public:
explicit reverse_range(T &x) : m_x(x) {}
-
+
auto begin() const -> decltype(this->m_x.rbegin())
{
return m_x.rbegin();
}
-
+
auto end() const -> decltype(this->m_x.rend())
{
return m_x.rend();
}
};
-
+
template <typename T>
reverse_range<T> reverse_iterate(T &x)
{