diff-utils: point: fix postfix decrement/increment operator
authorMatthias Maennich via libabigail <libabigail@sourceware.org>
Mon, 15 Apr 2019 17:05:16 +0000 (18:05 +0100)
committerDodji Seketeli <dodji@redhat.com>
Tue, 16 Apr 2019 14:11:01 +0000 (16:11 +0200)
The postfix increment / decrement operators were implemented by calling
themselves recursively. Fix that by implementing these in terms of their
prefix counter parts.

 * include/abg-diff-utils.h: fix postfix dec/inc operator

Signed-off-by: Matthias Maennich <maennich@google.com>
include/abg-diff-utils.h

index 4e65fe8..1c71185 100644 (file)
@@ -186,7 +186,7 @@ public:
   operator--(int)
   {
     point tmp(*this);
-    (*this)--;
+    --(*this);
     return tmp;
   }
 
@@ -194,7 +194,7 @@ public:
   operator++(int)
   {
     point tmp(*this);
-    (*this)++;
+    ++(*this);
     return tmp;
   }