diff --git a/ContextBasedFeature.cpp b/ContextBasedFeature.cpp index 0d3645e..0773e96 100644 --- a/ContextBasedFeature.cpp +++ b/ContextBasedFeature.cpp @@ -158,7 +158,7 @@ bool ContextBasedFeature::prepare( const CorePoints& corePoints, errorMessage = "Not enough memory"; return false; } - + for (unsigned i = 0; i < classifSF->size(); ++i) { if (classifSF->getValue(i) == fClass) @@ -224,6 +224,10 @@ bool ContextBasedFeature::prepare( const CorePoints& corePoints, case DH: s = static_cast(sqrt(pow(P->x - sumQ.x / kNN, 2.0) + pow(P->y - sumQ.y / kNN, 2.0))); break; + default: + assert(false); + s = CCCoreLib::NAN_VALUE; + break; } }