From 272025bb075c2e570d59791d223ed9564e8f6b86 Mon Sep 17 00:00:00 2001 From: Jeremy Siek Date: Thu, 15 Feb 2001 06:47:06 +0000 Subject: [PATCH] fixed my_int::operator-- [SVN r9208] --- counting_iterator_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/counting_iterator_test.cpp b/counting_iterator_test.cpp index 7fd3e1b..d5cdb14 100644 --- a/counting_iterator_test.cpp +++ b/counting_iterator_test.cpp @@ -192,7 +192,7 @@ public: my_int2() { } my_int2(int x) : m_int(x) { } my_int2& operator++() { ++m_int; return *this; } - my_int2& operator--() { ++m_int; return *this; } + my_int2& operator--() { --m_int; return *this; } bool operator==(const my_int2& x) const { return m_int == x.m_int; } private: int m_int; @@ -211,7 +211,7 @@ public: my_int3& operator++() { ++m_int; return *this; } my_int3& operator+=(std::ptrdiff_t n) { m_int += n; return *this; } std::ptrdiff_t operator-(const my_int3& x) { return m_int - x.m_int; } - my_int3& operator--() { ++m_int; return *this; } + my_int3& operator--() { --m_int; return *this; } bool operator==(const my_int3& x) const { return m_int == x.m_int; } bool operator<(const my_int3& x) const { return m_int < x.m_int; } private: