Fix warnings emitted by VS2017 (#614)
authorAlpar Juttner <alpar@cs.elte.hu>
Mon, 15 Oct 2018 23:22:18 +0200
changeset 139661fdd06833a6
parent 1395 f425c93848fa
child 1397 d7e25df22e88
Fix warnings emitted by VS2017 (#614)
lemon/random.h
test/max_flow_test.cc
     1.1 --- a/lemon/random.h	Wed Oct 17 18:56:39 2018 +0200
     1.2 +++ b/lemon/random.h	Mon Oct 15 23:22:18 2018 +0200
     1.3 @@ -342,7 +342,7 @@
     1.4          do {
     1.5            num = rnd() & mask;
     1.6          } while (num > max);
     1.7 -        return num;
     1.8 +        return static_cast<Result>(num);
     1.9        }
    1.10      };
    1.11  
     2.1 --- a/test/max_flow_test.cc	Wed Oct 17 18:56:39 2018 +0200
     2.2 +++ b/test/max_flow_test.cc	Mon Oct 15 23:22:18 2018 +0200
     2.3 @@ -419,7 +419,7 @@
     2.4    checkMaxFlowAlg<PType2, PreflowStartFunctions<PType2> >(test_lgf, 13);
     2.5    checkMaxFlowAlg<PType3, PreflowStartFunctions<PType3> >(test_lgf, 13);
     2.6  
     2.7 -  checkMaxFlowAlg<PType2, PreflowStartFunctions<PType2> >(test_lgf_float, 0.3);
     2.8 +  checkMaxFlowAlg<PType2, PreflowStartFunctions<PType2> >(test_lgf_float, 0.3f);
     2.9    checkMaxFlowAlg<PType3, PreflowStartFunctions<PType3> >(test_lgf_float, 0.3);
    2.10  
    2.11    checkInitPreflow();
    2.12 @@ -433,7 +433,7 @@
    2.13    checkMaxFlowAlg<EKType2, GeneralStartFunctions<EKType2> >(test_lgf, 13);
    2.14    checkMaxFlowAlg<EKType3, GeneralStartFunctions<EKType3> >(test_lgf, 13);
    2.15  
    2.16 -  checkMaxFlowAlg<EKType2, GeneralStartFunctions<EKType2> >(test_lgf_float, 0.3);
    2.17 +  checkMaxFlowAlg<EKType2, GeneralStartFunctions<EKType2> >(test_lgf_float, 0.3f);
    2.18    checkMaxFlowAlg<EKType3, GeneralStartFunctions<EKType3> >(test_lgf_float, 0.3);
    2.19  
    2.20    return 0;