Missing default/Invalid in a switch statement

This commit is contained in:
Romain Janvier
2025-02-12 14:55:14 +01:00
parent b4d3fc1a07
commit 8dc3a3ffff
+5 -1
View File
@@ -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<ScalarType>(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;
}
}