diff --git a/indexer/feature_data.cpp b/indexer/feature_data.cpp index 872468bfe8..ffaf297270 100644 --- a/indexer/feature_data.cpp +++ b/indexer/feature_data.cpp @@ -360,6 +360,10 @@ bool FeatureParams::FinishAddingTypes() newTypes.push_back(candidate); } + // Remove duplicated types. + sort(newTypes.begin(), newTypes.end()); + newTypes.erase(unique(newTypes.begin(), newTypes.end()), newTypes.end()); + m_Types.swap(newTypes); if (m_Types.size() > max_types_count)