# HG changeset patch # User Alpar Juttner # Date 1539638538 -7200 # Node ID 61fdd06833a6db0a072b247b063a99f049dcf1e2 # Parent f425c93848fa0163a84c3c48512e4f8fdb003513 Fix warnings emitted by VS2017 (#614) diff -r f425c93848fa -r 61fdd06833a6 lemon/random.h --- a/lemon/random.h Wed Oct 17 18:56:39 2018 +0200 +++ b/lemon/random.h Mon Oct 15 23:22:18 2018 +0200 @@ -342,7 +342,7 @@ do { num = rnd() & mask; } while (num > max); - return num; + return static_cast(num); } }; diff -r f425c93848fa -r 61fdd06833a6 test/max_flow_test.cc --- a/test/max_flow_test.cc Wed Oct 17 18:56:39 2018 +0200 +++ b/test/max_flow_test.cc Mon Oct 15 23:22:18 2018 +0200 @@ -419,7 +419,7 @@ checkMaxFlowAlg >(test_lgf, 13); checkMaxFlowAlg >(test_lgf, 13); - checkMaxFlowAlg >(test_lgf_float, 0.3); + checkMaxFlowAlg >(test_lgf_float, 0.3f); checkMaxFlowAlg >(test_lgf_float, 0.3); checkInitPreflow(); @@ -433,7 +433,7 @@ checkMaxFlowAlg >(test_lgf, 13); checkMaxFlowAlg >(test_lgf, 13); - checkMaxFlowAlg >(test_lgf_float, 0.3); + checkMaxFlowAlg >(test_lgf_float, 0.3f); checkMaxFlowAlg >(test_lgf_float, 0.3); return 0;