From 5a1e9876fcec863ae454b0f540a01f0ffe127efe Mon Sep 17 00:00:00 2001 From: Juan Manuel Perez Date: Tue, 24 Sep 2013 22:21:31 +0200 Subject: [PATCH] Corrected compilation errors Win --- modules/shape/src/aff_trans.cpp | 4 ++-- modules/shape/src/emdL1.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/shape/src/aff_trans.cpp b/modules/shape/src/aff_trans.cpp index e3d41d0..02f290f 100644 --- a/modules/shape/src/aff_trans.cpp +++ b/modules/shape/src/aff_trans.cpp @@ -82,13 +82,13 @@ public: virtual void write(FileStorage& fs) const { fs << "name" << name_ - << "affine_type" << fullAffine; + << "affine_type" << int(fullAffine); } virtual void read(const FileNode& fn) { CV_Assert( (String)fn["name"] == name_ ); - fullAffine = (bool)int(fn["affine_type"]); + fullAffine = int(fn["affine_type"])?true:false; } private: diff --git a/modules/shape/src/emdL1.cpp b/modules/shape/src/emdL1.cpp index 423f8ef..1c09ae4 100644 --- a/modules/shape/src/emdL1.cpp +++ b/modules/shape/src/emdL1.cpp @@ -48,7 +48,7 @@ * Distance: Some Insights from Statistics", by Elizaveta Levina and * Peter Bickel, based on HAIBIN LING AND KAZUNORI OKADA implementation. */ - + #include "precomp.hpp" #include "emdL1_def.hpp" @@ -393,9 +393,9 @@ bool EmdL1::greedySolution3() //- determine which direction to move, either right or upward dFlow = D[i1][i2][i3]; - f1 = i1<(binsDim1-1)?(float)fabs(dFlow+d1s[i1+1]):VHIGH; - f2 = i2<(binsDim2-1)?(float)fabs(dFlow+d2s[i2+1]):VHIGH; - f3 = i3<(binsDim3-1)?(float)fabs(dFlow+d3s[i3+1]):VHIGH; + f1 = i1<(binsDim1-1)?(float)fabs(float(dFlow+d1s[i1+1])):VHIGH; + f2 = i2<(binsDim2-1)?(float)fabs(float(dFlow+d2s[i2+1])):VHIGH; + f3 = i3<(binsDim3-1)?(float)fabs(float(dFlow+d3s[i3+1])):VHIGH; if(f1