summaryrefslogtreecommitdiffstats
path: root/include/shard/WIRS.h
diff options
context:
space:
mode:
authorDouglas Rumbaugh <dbr4@psu.edu>2023-05-29 16:49:52 -0400
committerDouglas Rumbaugh <dbr4@psu.edu>2023-05-29 16:49:52 -0400
commite47410d56c667cda9f8070a929df7a955ce13115 (patch)
tree01ad4baa9869ad07ad6e6f4548de974c28ded301 /include/shard/WIRS.h
parentab14529843d7bbb3a0d0c30b163ed444afee04ed (diff)
downloaddynamic-extension-e47410d56c667cda9f8070a929df7a955ce13115.tar.gz
Framework-level query testing + fixes
Diffstat (limited to 'include/shard/WIRS.h')
-rw-r--r--include/shard/WIRS.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/shard/WIRS.h b/include/shard/WIRS.h
index 7e3f468..020df19 100644
--- a/include/shard/WIRS.h
+++ b/include/shard/WIRS.h
@@ -203,7 +203,7 @@ public:
free_tree(m_root);
}
- Wrapped<R> *point_lookup(R &rec, bool filter=false) {
+ Wrapped<R> *point_lookup(const R &rec, bool filter=false) {
if (filter && !m_bf->lookup(rec.key)) {
return nullptr;
}
@@ -213,9 +213,9 @@ public:
return nullptr;
}
- while (idx < m_reccnt && m_data[idx] < rec) ++idx;
+ while (idx < m_reccnt && m_data[idx].rec < rec) ++idx;
- if (m_data[idx] == rec) {
+ if (m_data[idx].rec == rec) {
return m_data + idx;
}
@@ -254,7 +254,7 @@ private:
while (min < max) {
size_t mid = (min + max) / 2;
- if (key > m_data[mid].key) {
+ if (key > m_data[mid].rec.key) {
min = mid + 1;
} else {
max = mid;