From b85a6cdad782bc80507fa764cd1b18e9cd5b4191 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Sat, 4 Dec 2010 15:30:35 +0100 Subject: Added unary CyclicInt::operator-(). --- common/cyclicint.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/cyclicint.h b/common/cyclicint.h index 3b24399..7c06877 100644 --- a/common/cyclicint.h +++ b/common/cyclicint.h @@ -49,6 +49,10 @@ class CyclicInt { return v; } + CyclicInt operator-() { + return -value; + } + CyclicInt operator-(CyclicInt v) { return value - v.value; } -- cgit v1.2.3