diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2023-02-08 15:36:23 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2023-02-08 15:46:02 -0500 |
commit | c583a2520616c2736cffc389c89a48b159366e6c (patch) | |
tree | b4925f26506fcee96c16119431c01760f05db95d /gdbsupport/next-iterator.h | |
parent | ca7f92c2f15b86b09c4a8ad14806bef666308d31 (diff) | |
download | gdb-users/simark/clang-format.zip gdb-users/simark/clang-format.tar.gz gdb-users/simark/clang-format.tar.bz2 |
Run clang-format.shusers/simark/clang-format
Change-Id: Ia948cc26d534b0dd02702244d52434b1a2093968
Diffstat (limited to 'gdbsupport/next-iterator.h')
-rw-r--r-- | gdbsupport/next-iterator.h | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/gdbsupport/next-iterator.h b/gdbsupport/next-iterator.h index d4d98a0..d630f3c 100644 --- a/gdbsupport/next-iterator.h +++ b/gdbsupport/next-iterator.h @@ -35,21 +35,12 @@ struct next_iterator typedef std::forward_iterator_tag iterator_category; typedef int difference_type; - explicit next_iterator (T *item) - : m_item (item) - { - } + explicit next_iterator (T *item) : m_item (item) {} /* Create a one-past-the-end iterator. */ - next_iterator () - : m_item (nullptr) - { - } + next_iterator () : m_item (nullptr) {} - value_type operator* () const - { - return m_item; - } + value_type operator* () const { return m_item; } bool operator== (const self_type &other) const { @@ -68,13 +59,12 @@ struct next_iterator } private: - T *m_item; }; /* A convenience wrapper to make a range type around a next_iterator. */ -template <typename T> +template<typename T> using next_range = iterator_range<next_iterator<T>>; #endif /* COMMON_NEXT_ITERATOR_H */ |