Update GarbageCollector.cpp and Object.cpp

This commit is contained in:
Jordon Brooks 2025-06-24 01:14:42 +01:00
parent 1a36292055
commit ceca273262
2 changed files with 4 additions and 5 deletions

View file

@ -69,11 +69,10 @@ void GarbageCollector::RemoveObject(std::shared_ptr<Object> ObjectToRemove)
if (newEnd != _RootObjects.end()) if (newEnd != _RootObjects.end())
{ {
_RootObjects.erase(newEnd, _RootObjects.end()); _RootObjects.erase(newEnd, _RootObjects.end());
LOG_INFO("Removed object from GC: {0}", object->GetName()); LOG_INFO("Removed object from GC: %s", ObjectToRemove->GetName());
} }
else else
{ {
LOG_ERROR("RemoveObject(): {0} not found in GC", LOG_ERROR("RemoveObject(): %s not found in GC", ObjectToRemove->GetName());
object->GetName());
} }
} }

View file

@ -5,7 +5,7 @@
Object::~Object() Object::~Object()
{ {
LOG_INFO("Destroying object: {0}", GetName()); LOG_INFO("Destroying object: %s", GetName());
} }
void Object::Init() void Object::Init()
@ -15,7 +15,7 @@ void Object::Init()
FluxEngine* engine = GetEngine(); FluxEngine* engine = GetEngine();
if (!engine) if (!engine)
{ {
LOG_ERROR("Failed to initialize object: {0}", GetName()); LOG_ERROR("Failed to initialize object: %s", GetName());
return; return;
} }