fix typo of macro

dev
MITSUNARI Shigeo 7 years ago
parent c4c1d4c1fe
commit 10dbca28ef
  1. 2
      Makefile
  2. 6
      include/mcl/randgen.hpp

@ -287,7 +287,7 @@ bin/emu:
# test
CLANG_WASM=-DNDEBUG -DMCLSHE_WIN_SIZE=8 -DCYBOZU_MINIMUM_EXCEPTION
CLANG_WASM+=-DMCL_SIZEOF_UNIT=8 -DMCL_MAX_BIT_SIZE=256
CLANG_WASM+=-DCYBOZU_DONT_USE_EXCEPTION -DCYBOZU_DONT_USE_STRING -DMCL_DONT_USE_CSRPNG
CLANG_WASM+=-DCYBOZU_DONT_USE_EXCEPTION -DCYBOZU_DONT_USE_STRING -DMCL_DONT_USE_CSPRNG
CLANG_WASM+=-O3 -Oz -target wasm32-wasm -fno-exceptions
CLANG_WASM+=-Wall -Wextra
CLANG_WASM+=-I./include -I../cybozulib/include -std=c++03

@ -6,7 +6,7 @@
@license modified new BSD license
http://opensource.org/licenses/BSD-3-Clause
*/
#ifdef MCL_DONT_USE_CSRPNG
#ifdef MCL_DONT_USE_CSPRNG
// nothing
@ -91,14 +91,14 @@ public:
{
readFunc_(self_, out, static_cast<uint32_t>(byteSize));
}
#ifdef MCL_DONT_USE_CSRPNG
#ifdef MCL_DONT_USE_CSPRNG
bool isZero() const { return false; } /* return false to avoid copying default rg */
#else
bool isZero() const { return self_ == 0 && readFunc_ == 0; }
#endif
static RandGen& get()
{
#ifdef MCL_DONT_USE_CSRPNG
#ifdef MCL_DONT_USE_CSPRNG
static RandGen wrg;
#elif defined(MCL_USE_WEB_CRYPTO_API)
static mcl::RandomGeneratorJS rg;

Loading…
Cancel
Save