Actions
Bug #3070
closedBlock::remove unexpected semantics
Start date:
07/26/2015
Due date:
% Done:
100%
Estimated time:
1.50 h
Description
Block class has a remove method:
void
remove(uint32_t type);
This method is missing Doxygen, is missing a test case, and is unused within ndn-cxx.
Based on function name and signature, either of the following semantics are reasonable:
/** \brief remove all subelements of \p type
 *  \param type TLV-TYPE of subelement to remove
 *  \pre parse() has been invoked
 */
/** \brief remove the first subelements of \p type
 *  \param type TLV-TYPE of subelement to remove
 *  \pre parse() has been invoked
 */
However, the actual behavior is: remove all subelements whose TLV-TYPE is not type.
This semantics is surprising.
To solve this bug:
- decide on the correct semantics
 - add Doxygen
 - add test case
 - fix implementation
 - post a "potential breaking change" notice to ndn-lib mailing list
 - fix regressions on dependent projects, if any
 
Actions