inconsistent return value of ProjDataInfo::get_bin() and CListEvent::get_bin() when out-of-range
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 160
- Forks
- 113
- Avg merge
- 12d 15h
- Merged PRs (30d)
- 1
Description
ProjDataInfo::get_bin sets bin_value to -1 if the request bin is outside of the allowed range (and says so in the doxygen).
Some derived ClistEvent*::get_bin() sets bin_value=0 if out-of-range, others to -1. (CListEvent`'s doxygen says it will return bin_value<=0, so is also correct).
Luckily LmToProjData::get_bin checks if bin_value<=0 so both options are ok.
Nevertheless, it would be better to be consistent. A value of 0 might make most sense as LmToProjData::get_bin will set it to zero (as it has to be able to return negative numbers to cope with delayeds). This would be inconsistent with ProjDataInfo::get_bin's documentation though so might affect someone.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search for ProjDataInfo::get_bin and the derived CListEvent::get_bin implementations, then compare their out-of-range return handling with the Doxygen described in the issue. Determine which sentinel value is intended without breaking LmToProjData::get_bin, update the affected implementations and documentation consistently, and verify the behavior across the relevant get_bin callers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend-api-design
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100