fixed errors

This commit is contained in:
AndreaRigoni
2026-03-25 20:30:46 +00:00
parent 6a65fe94c8
commit e4a8499104
17 changed files with 344 additions and 269 deletions

View File

@@ -70,14 +70,17 @@ public:
// Implementations of Property methods
void Object::RegisterProperty(PropertyBase* prop) {
if (prop) d->m_Properties.push_back(prop);
if (prop) {
d->m_Properties.push_back(prop);
}
}
void Object::RegisterDynamicProperty(PropertyBase* prop) {
if (prop) {
for (auto* existing : d->m_DynamicProperties) {
if (existing == prop) return;
}
d->m_DynamicProperties.push_back(prop);
// Note: prop already added itself to m_Properties
// during its own constructor call to owner->RegisterProperty()
}
}
@@ -117,14 +120,12 @@ template void Object::serialize(Archive::log_archive &, const unsigned int);
Object::Object() : d(new ObjectPrivate) {
d->m_SignalsBlocked = false;
std::cout << "Object Constructor: created d=" << d << std::endl;
}
Object::Object(const Object &copy) : d(new ObjectPrivate) {
if (copy.d) {
d->m_InstanceName = copy.d->m_InstanceName;
d->m_SignalsBlocked = copy.d->m_SignalsBlocked;
}
std::cout << "Object CopyConstructor: created d=" << d << " from copy.d=" << copy.d << std::endl;
}
Object& Object::operator=(const Object &other) {
@@ -140,7 +141,6 @@ Object& Object::operator=(const Object &other) {
}
Object::~Object() {
std::cout << "Object Destructor: deleting d=" << d << " name=" << d->m_InstanceName << std::endl;
for (auto* p : d->m_DynamicProperties) {
delete p;
}