summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2010-12-04 15:30:35 +0100
committerVegard Storheil Eriksen <zyp@jvnv.net>2010-12-04 15:31:19 +0100
commitb85a6cdad782bc80507fa764cd1b18e9cd5b4191 (patch)
treea9d58837aa013911f676f54492f0697ca9867593
parent34e376a4908f8f2235d28314c4f779bbd1d09389 (diff)
Added unary CyclicInt::operator-().
-rw-r--r--common/cyclicint.h4
1 files changed, 4 insertions, 0 deletions
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;
}