From 6bdcf74ad91e0efaa8c2e4339f5085fde8a7982b Mon Sep 17 00:00:00 2001 From: Douglas Rumbaugh Date: Sat, 5 Apr 2025 19:08:12 -0400 Subject: working commit (temporary progress, doesn't build) --- include/framework/structure/ExtensionStructure.h | 3 +++ include/framework/structure/InternalLevel.h | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'include/framework/structure') diff --git a/include/framework/structure/ExtensionStructure.h b/include/framework/structure/ExtensionStructure.h index 521e68b..a77088f 100644 --- a/include/framework/structure/ExtensionStructure.h +++ b/include/framework/structure/ExtensionStructure.h @@ -231,6 +231,9 @@ public: if (shard_idx != -1) { m_levels[shards[i].first]->delete_shard(shard_idx); + } else { + fprintf(stderr, "ERROR: failed to delete shard %ld\t%p\n", shards[i].first, shards[i].second); + //exit(EXIT_FAILURE); } } } diff --git a/include/framework/structure/InternalLevel.h b/include/framework/structure/InternalLevel.h index 6e8b67e..5659c72 100644 --- a/include/framework/structure/InternalLevel.h +++ b/include/framework/structure/InternalLevel.h @@ -102,8 +102,12 @@ public: return false; } - const ShardType *get_shard(size_t idx) const { - if (idx >= m_shards.size()) { + const ShardType *get_shard(ssize_t idx) const { + if (idx == all_shards_idx) { + idx = 0; + } + + if (idx >= (ssize_t) m_shards.size()) { return nullptr; } -- cgit v1.2.3