mirror of
https://github.com/kemko/nomad.git
synced 2026-01-04 17:35:43 +03:00
inclusive range
This commit is contained in:
@@ -58,7 +58,7 @@ func (b Bitmap) Clear() {
|
||||
// on the passed parameter in the passed range
|
||||
func (b Bitmap) IndexesInRange(set bool, from, to uint) []int {
|
||||
var indexes []int
|
||||
for i := from; i < to; i++ {
|
||||
for i := from; i <= to; i++ {
|
||||
c := b.Check(i)
|
||||
if c && set || !c && !set {
|
||||
indexes = append(indexes, int(i))
|
||||
|
||||
Reference in New Issue
Block a user