switch on int

This commit is contained in:
tevador 2019-10-10 07:48:03 +02:00
parent abf2a5034e
commit 4296c35d79

View file

@ -64,7 +64,7 @@ extern "C" {
try { try {
cache = new randomx_cache(); cache = new randomx_cache();
cache->argonImpl = impl; cache->argonImpl = impl;
switch (flags & (RANDOMX_FLAG_JIT | RANDOMX_FLAG_LARGE_PAGES)) { switch ((int)(flags & (RANDOMX_FLAG_JIT | RANDOMX_FLAG_LARGE_PAGES))) {
case RANDOMX_FLAG_DEFAULT: case RANDOMX_FLAG_DEFAULT:
cache->dealloc = &randomx::deallocCache<randomx::DefaultAllocator>; cache->dealloc = &randomx::deallocCache<randomx::DefaultAllocator>;
cache->jit = nullptr; cache->jit = nullptr;
@ -193,7 +193,7 @@ extern "C" {
randomx_vm *vm = nullptr; randomx_vm *vm = nullptr;
try { try {
switch (flags & (RANDOMX_FLAG_FULL_MEM | RANDOMX_FLAG_JIT | RANDOMX_FLAG_HARD_AES | RANDOMX_FLAG_LARGE_PAGES)) { switch ((int)(flags & (RANDOMX_FLAG_FULL_MEM | RANDOMX_FLAG_JIT | RANDOMX_FLAG_HARD_AES | RANDOMX_FLAG_LARGE_PAGES))) {
case RANDOMX_FLAG_DEFAULT: case RANDOMX_FLAG_DEFAULT:
vm = new randomx::InterpretedLightVmDefault(); vm = new randomx::InterpretedLightVmDefault();
break; break;