aboutsummaryrefslogtreecommitdiffstats
path: root/src/ObjectManager.cpp
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-06-05 21:40:44 -0300
committerGitHub <noreply@github.com>2026-06-05 21:40:44 -0300
commit5174fc25698cff33b03b5746bf1742e417988f7d (patch)
tree232a3acdd9b458de481dbd5cbde889505168c8e8 /src/ObjectManager.cpp
parent85ed897de3676af866cc619dc700025820c02201 (diff)
downloadRNT-5174fc25698cff33b03b5746bf1742e417988f7d.tar.gz
RNT-5174fc25698cff33b03b5746bf1742e417988f7d.zip
Project C interface, reroute FOL plan enums & format
Diffstat (limited to '')
-rw-r--r--src/ObjectManager.cpp26
1 files changed, 9 insertions, 17 deletions
diff --git a/src/ObjectManager.cpp b/src/ObjectManager.cpp
index 67504c3..70e622b 100644
--- a/src/ObjectManager.cpp
+++ b/src/ObjectManager.cpp
@@ -1,11 +1,8 @@
#include "ObjectManager.h"
-namespace nt
-{
- void ObjectManager::Register(std::vector<std::string> path,
- std::unique_ptr<IObject> object,
- std::unique_ptr<object_type> type)
- {
+namespace nt {
+ void ObjectManager::Register(std::vector<std::string> path, std::unique_ptr<IObject> object,
+ std::unique_ptr<object_type> type) {
auto head = std::make_unique<registry_head>();
head->reference_count = 0;
head->handle_count = 0;
@@ -19,11 +16,9 @@ namespace nt
entries = std::move(entry);
}
- ObjectManager::registry* ObjectManager::Find(const std::vector<std::string> object_path)
- {
+ ObjectManager::registry* ObjectManager::Find(const std::vector<std::string> object_path) {
registry* current = entries.get();
- while (current != nullptr)
- {
+ while (current != nullptr) {
if (current->head->path == object_path)
return current;
current = current->next.get();
@@ -31,13 +26,10 @@ namespace nt
return nullptr;
}
- bool ObjectManager::Unregister(const std::vector<std::string>& object_path)
- {
+ bool ObjectManager::Unregister(const std::vector<std::string>& object_path) {
std::unique_ptr<registry>* slot = &entries;
- while (slot->get() != nullptr)
- {
- if ((*slot)->head->path == object_path)
- {
+ while (slot->get() != nullptr) {
+ if ((*slot)->head->path == object_path) {
*slot = std::move((*slot)->next);
return true;
}
@@ -45,4 +37,4 @@ namespace nt
}
return false;
}
-}
+} // namespace nt