summaryrefslogtreecommitdiffstats
path: root/include/framework/structure/InternalLevel.h
diff options
context:
space:
mode:
authorDouglas Rumbaugh <dbr4@psu.edu>2025-04-07 14:37:19 -0400
committerDouglas Rumbaugh <dbr4@psu.edu>2025-04-07 14:37:19 -0400
commita9ee3f2f7f557adbe5448e4f4fbf71c23fe808b1 (patch)
treec3c404223d852b64a57d5265221c4a2d05d0af73 /include/framework/structure/InternalLevel.h
parent6bdcf74ad91e0efaa8c2e4339f5085fde8a7982b (diff)
downloaddynamic-extension-a9ee3f2f7f557adbe5448e4f4fbf71c23fe808b1.tar.gz
Implemented the legacy policies and fixed a few bugs
Diffstat (limited to 'include/framework/structure/InternalLevel.h')
-rw-r--r--include/framework/structure/InternalLevel.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/include/framework/structure/InternalLevel.h b/include/framework/structure/InternalLevel.h
index 5659c72..54b3ae2 100644
--- a/include/framework/structure/InternalLevel.h
+++ b/include/framework/structure/InternalLevel.h
@@ -217,17 +217,11 @@ public:
m_shards.push_back(shard);
}
- const ShardType *get_shard(ShardID shid) const {
- if (shid < m_shards.size()) {
- return m_shards[shid].first.get();
- }
-
- return nullptr;
- }
-
- const shard_ptr get_shard_ptr(size_t shid) const {
- if (shid < m_shards.size()) {
- return m_shards[shid];
+ const shard_ptr get_shard_ptr(ssize_t idx) const {
+ if (idx >= 0 && idx < (ssize_t) m_shards.size()) {
+ return m_shards[idx];
+ } else if (idx == all_shards_idx && m_shards.size() == 1) {
+ return m_shards[0];
}
return {nullptr, 0};