Another possibility is to first count how many elements in `m_feature_types` are equal to 2, and then just use a `SGVector` instead of `CDynamicArray` for `cont_ind`. For large arrays, there might be a difference in performance taking into account the sequential access below.