From aedc26f11b8c4b4201b44399c4ebc2d5eff06c42 Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Sun, 26 Mar 2017 14:46:34 +0900 Subject: [PATCH] add const for normalize --- include/mcl/fp.hpp | 2 +- include/mcl/fp_tower.hpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/mcl/fp.hpp b/include/mcl/fp.hpp index d8cc1bf..3a6d0fc 100644 --- a/include/mcl/fp.hpp +++ b/include/mcl/fp.hpp @@ -463,7 +463,7 @@ public: { return fp::isLessArray(v_, rhs.v_, op_.N); } - void normalize() {} // dummy method + void normalize() const {} // dummy method /* set IoMode for operator<<(), or operator>>() */ diff --git a/include/mcl/fp_tower.hpp b/include/mcl/fp_tower.hpp index ae8effb..55c4be0 100644 --- a/include/mcl/fp_tower.hpp +++ b/include/mcl/fp_tower.hpp @@ -157,7 +157,7 @@ public: bool isOne() const { return a.isOne() && b.isZero(); } bool operator==(const Fp2T& rhs) const { return a == rhs.a && b == rhs.b; } bool operator!=(const Fp2T& rhs) const { return !operator==(rhs); } - void normalize() {} // dummy method + void normalize() const {} // dummy method /* return true is a is odd (do not consider b) this function is for only compressed reprezentation of EC @@ -753,7 +753,7 @@ struct Fp6T : public fp::Operator > { Fp2::mul(y.b, p.b, q); Fp2::mul(y.c, p.c, q); } - void normalize() {} // dummy + void normalize() const {} // dummy }; /* @@ -897,7 +897,7 @@ struct Fp12T : public fp::Operator > { { return a.getStr(ioMode) + fp::getIoSeparator(ioMode) + b.getStr(ioMode); } - void normalize() {} // dummy + void normalize() const {} // dummy }; } // mcl