diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2017-04-07 13:04:06 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2017-04-07 13:04:06 +0800 |
commit | 84a05e93499d6a01abdf95a634e5521e51b361ee (patch) | |
tree | 2183b7f68d31168262eaf427a54e867fdeef1c09 /include | |
parent | 8c224d188cb8b9a428f3cf4f5afa86eac45fbba7 (diff) | |
download | tangerine-mcl-84a05e93499d6a01abdf95a634e5521e51b361ee.tar.gz tangerine-mcl-84a05e93499d6a01abdf95a634e5521e51b361ee.tar.zst tangerine-mcl-84a05e93499d6a01abdf95a634e5521e51b361ee.zip |
remove warning of vc
Diffstat (limited to 'include')
-rw-r--r-- | include/mcl/bn.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/mcl/bn.hpp b/include/mcl/bn.hpp index c791ff1..9ded39e 100644 --- a/include/mcl/bn.hpp +++ b/include/mcl/bn.hpp @@ -206,14 +206,14 @@ template<class Fp> struct GLV { typedef mcl::EcT<Fp> G1; Fp rw; // rw = 1 / w = (-1 - sqrt(-3)) / 2 - int m; + size_t m; mpz_class v0, v1; mpz_class B[2][2]; mpz_class r; void init(const mpz_class& r, const mpz_class& z) { if (!Fp::squareRoot(rw, -3)) throw cybozu::Exception("GLV:init"); - rw = (-1 - rw) / 2; + rw = -(rw + 1) / 2; this->r = r; m = gmp::getBitSize(r); m = (m + fp::UnitBitSize - 1) & ~(fp::UnitBitSize - 1);// a little better size |