From 0282b9428cd0828876468e9d100a8fb986704828 Mon Sep 17 00:00:00 2001 From: Davis King Date: Mon, 16 Oct 2017 09:22:01 -0400 Subject: [PATCH] Fixed compiler error due to #define nonsense in visual studio. --- dlib/test/rand.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dlib/test/rand.cpp b/dlib/test/rand.cpp index f7bfe4ca3..71be1f5f5 100644 --- a/dlib/test/rand.cpp +++ b/dlib/test/rand.cpp @@ -388,22 +388,22 @@ namespace dlib::rand rnd; - int big = 0; - int small = 0; + int big_val = 0; + int small_val = 0; const long long maxval = (((unsigned long long)1)<<62) + (((unsigned long long)1)<<61); for (int i = 0; i < 10000000; ++i) { if (rnd.get_integer(maxval) > maxval/2) - ++big; + ++big_val; else - ++small; + ++small_val; } // make sure there isn't any funny bias - DLIB_TEST(std::abs(big/(double)small - 1) < 0.001); + DLIB_TEST(std::abs(big_val/(double)small_val - 1) < 0.001); - cout << big/(double)small << endl; + cout << big_val/(double)small_val << endl; }