diff --git a/Source/moja.modules.cbm/include/moja/modules/cbm/growthcurvetransform.h b/Source/moja.modules.cbm/include/moja/modules/cbm/growthcurvetransform.h index f2255026..e9e340ba 100644 --- a/Source/moja.modules.cbm/include/moja/modules/cbm/growthcurvetransform.h +++ b/Source/moja.modules.cbm/include/moja/modules/cbm/growthcurvetransform.h @@ -19,13 +19,13 @@ struct GCCacheKey { } bool operator<(const GCCacheKey& other) const { - if (_classifierValues.size() < other._classifierValues.size()) { - return true; + if (_classifierValues.size() != other._classifierValues.size()) { + return _classifierValues.size() < other._classifierValues.size(); } for (int i = 0; i < _classifierValues.size(); i++) { - if (_classifierValues[i] < other._classifierValues[i]) { - return true; + if (_classifierValues[i] != other._classifierValues[i]) { + return _classifierValues[i] < other._classifierValues[i]; } } diff --git a/Source/moja.modules.cbm/include/moja/modules/cbm/transitionruletransform.h b/Source/moja.modules.cbm/include/moja/modules/cbm/transitionruletransform.h index ebe8bdf7..9ff34213 100644 --- a/Source/moja.modules.cbm/include/moja/modules/cbm/transitionruletransform.h +++ b/Source/moja.modules.cbm/include/moja/modules/cbm/transitionruletransform.h @@ -19,13 +19,13 @@ struct TRCacheKey { } bool operator<(const TRCacheKey& other) const { - if (_classifierValues.size() < other._classifierValues.size()) { - return true; + if (_classifierValues.size() != other._classifierValues.size()) { + return _classifierValues.size() < other._classifierValues.size(); } for (int i = 0; i < _classifierValues.size(); i++) { - if (_classifierValues[i] < other._classifierValues[i]) { - return true; + if (_classifierValues[i] != other._classifierValues[i]) { + return _classifierValues[i] < other._classifierValues[i]; } }