aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2017-08-03 15:27:27 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2017-08-03 15:27:27 +0800
commitfd96fc58d29258438a75e070bd84c1b1ecf3ba16 (patch)
tree20e01584ed966f970b83f4441fae58c123ca45bd
parent20fed614d33a8877a8328925a689600105427619 (diff)
downloaddexon-mcl-fd96fc58d29258438a75e070bd84c1b1ecf3ba16.tar.gz
dexon-mcl-fd96fc58d29258438a75e070bd84c1b1ecf3ba16.tar.zst
dexon-mcl-fd96fc58d29258438a75e070bd84c1b1ecf3ba16.zip
use FixedBuffer for vint
-rw-r--r--include/mcl/vint.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/mcl/vint.hpp b/include/mcl/vint.hpp
index ea7eae4..85a49e1 100644
--- a/include/mcl/vint.hpp
+++ b/include/mcl/vint.hpp
@@ -16,6 +16,8 @@
#ifdef __EMSCRIPTEN__
#define MCL_VINT_64BIT_PORTABLE
+ #define MCL_VINT_FIXED_BUFFER
+ #define MCL_MAX_BIT_SIZE 384
#endif
#ifndef MCL_SIZEOF_UNIT
@@ -863,7 +865,7 @@ public:
void verify(size_t n) const
{
if (n > N) {
- throw cybozu::Exception("verify:too large size") << n << N;
+ throw cybozu::Exception("verify:too large size") << n << (int)N;
}
}
const T& operator[](size_t n) const { verify(n); return v_[n]; }