Fixed gcc build warning

This commit is contained in:
Andrey Kamaev 2012-08-20 19:51:19 +04:00
parent d8b69d750d
commit 4a1ef53deb

View File

@ -2601,7 +2601,7 @@ void HOGDescriptor::readALTModel(std::string modelfile)
double *linearwt = new double[totwords+1]; double *linearwt = new double[totwords+1];
int length = totwords; int length = totwords;
nread = fread(linearwt, sizeof(double), totwords + 1, modelfl); nread = fread(linearwt, sizeof(double), totwords + 1, modelfl);
if(nread != length + 1) if(nread != static_cast<size_t>(length) + 1)
throw Exception(); throw Exception();
for(int i = 0; i < length; i++) for(int i = 0; i < length; i++)