Open codeflakes0 opened 7 years ago
in the following code:
bool GestureRecognitionPipeline::addPreProcessingModule(const PreProcessing &preProcessingModule,UINT insertIndex){ //Validate the insertIndex is valid if( insertIndex != INSERT_AT_END_INDEX && insertIndex >= preProcessingModules.getSize() ){ errorLog << __FILENAME__ << "Invalid insertIndex value!" << std::endl; return false; }
the ">=" should be only ">" or else you can never add a preprocessing module. If you want to add your first preprocessing at index 0 you can't fail if preProcessingModules.getSize() == 0.
if( insertIndex != INSERT_AT_END_INDEX && insertIndex > preProcessingModules.getSize()
Problem is the same with "addFeatureExtractionModule".
in the following code:
the ">=" should be only ">" or else you can never add a preprocessing module. If you want to add your first preprocessing at index 0 you can't fail if preProcessingModules.getSize() == 0.
if( insertIndex != INSERT_AT_END_INDEX && insertIndex > preProcessingModules.getSize()
Problem is the same with "addFeatureExtractionModule".