Actions
Task #4120
closedIn RegexComponentSetMatcher, m_components can be a vector
Start date:
Due date:
% Done:
100%
Estimated time:
Description
In RegexComponentSetMatcher, m_components is a set<shared_ptr<RegexComponentMatcher> >
.
https://github.com/named-data/ndn-cxx/blob/18cf81bf6e03fe518b4f2e9d0c02223276be2cf7/src/util/regex/regex-component-set-matcher.hpp#L71
But each added member is a new, different shared_ptr:
https://github.com/named-data/ndn-cxx/blob/18cf81bf6e03fe518b4f2e9d0c02223276be2cf7/src/util/regex/regex-component-set-matcher.hpp#L135
Different shared_ptr always compare unequal, so adding to the set always adds a new member. Therefore, m_components can be a vector, which is more efficient, and less confusing since it really doesn't maintain set behavior.
(This issue is just an observation. You can abandon it if you want.)
Updated by Davide Pesavento almost 7 years ago
- Status changed from New to Code review
- Assignee set to Davide Pesavento
- Target version set to v0.7
- Start date deleted (
06/07/2017) - % Done changed from 0 to 100
Updated by Davide Pesavento almost 7 years ago
- Status changed from Code review to Closed
Actions