From 399cdfc657b10cc0ef0902265c5dcee3a30cd977 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Sun, 11 Dec 2016 10:20:55 -1000 Subject: [PATCH] Update submodules --- hecl/extern/athena | 2 +- hecl/extern/boo | 2 +- hecl/include/hecl/BitVector.hpp | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hecl/extern/athena b/hecl/extern/athena index 8fce7ce16..255f2bf74 160000 --- a/hecl/extern/athena +++ b/hecl/extern/athena @@ -1 +1 @@ -Subproject commit 8fce7ce1619ad6cbcc47a7f6747d57eb37184eb2 +Subproject commit 255f2bf745edd042930d7b0376c5b33e14ed1729 diff --git a/hecl/extern/boo b/hecl/extern/boo index c057068e6..1177d50ed 160000 --- a/hecl/extern/boo +++ b/hecl/extern/boo @@ -1 +1 @@ -Subproject commit c057068e64b2123d426ad84606e8a756af11913f +Subproject commit 1177d50eda69fb5be711b5ebfa6ee290500ae342 diff --git a/hecl/include/hecl/BitVector.hpp b/hecl/include/hecl/BitVector.hpp index 59e8905bc..915fd9046 100644 --- a/hecl/include/hecl/BitVector.hpp +++ b/hecl/include/hecl/BitVector.hpp @@ -187,7 +187,7 @@ public: /// find_first_contiguous - Returns the index of the first contiguous /// set of bits of "Length", -1 if no contiguous bits found. - int find_first_contiguous(unsigned Length) const { + int find_first_contiguous(unsigned Length, unsigned BucketSz) const { for (int idx = find_first(); idx != -1; idx = find_next(idx)) { if (idx + Length > size()) return -1; @@ -201,7 +201,11 @@ public: } } if (good) - return idx; + { + unsigned space = BucketSz - (idx % BucketSz); + if (space >= Length) + return idx; + } } return -1; }