From 40707e4ddd55c0dbd9998d36da8c390bc5899f74 Mon Sep 17 00:00:00 2001 From: Juha Reunanen Date: Fri, 31 Mar 2017 12:38:31 +0300 Subject: [PATCH] On 64-bit builds, avoid compiler warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data --- Hungarian.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Hungarian.cpp b/Hungarian.cpp index deb4f71..9ee447c 100644 --- a/Hungarian.cpp +++ b/Hungarian.cpp @@ -24,8 +24,8 @@ HungarianAlgorithm::~HungarianAlgorithm(){} //********************************************************// double HungarianAlgorithm::Solve(vector >& DistMatrix, vector& Assignment) { - unsigned int nRows = DistMatrix.size(); - unsigned int nCols = DistMatrix[0].size(); + const unsigned int nRows = static_cast(DistMatrix.size()); + const unsigned int nCols = static_cast(DistMatrix[0].size()); double *distMatrixIn = new double[nRows * nCols]; int *assignment = new int[nRows];