Commit 940df574 authored by mercury233's avatar mercury233 Committed by GitHub

disable warning C4146 in get_random_integer_v2 (#771)

parent 8e539a65
......@@ -62,7 +62,9 @@ public:
// N % k == (N - k) % k, discard the leftmost numbers
int get_random_integer_v2(int l, int h) {
uint32_t range = (h - l + 1);
#pragma warning(disable:4146)
uint32_t bound = -range % range;
#pragma warning(default:4146)
auto x = rng();
while (x < bound) {
x = rng();
......
......@@ -37,7 +37,7 @@ workspace "ocgcoredll"
filter { "configurations:Release", "action:vs*" }
linktimeoptimization "On"
staticruntime "On"
disablewarnings { "4146", "4334" }
disablewarnings { "4334" }
filter "action:vs*"
cdialect "C11"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment