You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-14 13:41:12 +00:00
Merge pull request #46877 from W4RH4WK/always-dynamically-allocate-property-table
Always dynamically allocate PropertyTable
This commit is contained in:
@@ -160,7 +160,7 @@ const PropertyTable *GetPropertyTable(const Document &doc,
|
|||||||
DOMWarning("property table (Properties70) not found", element);
|
DOMWarning("property table (Properties70) not found", element);
|
||||||
}
|
}
|
||||||
if (templateProps) {
|
if (templateProps) {
|
||||||
return templateProps;
|
return new const PropertyTable(templateProps);
|
||||||
} else {
|
} else {
|
||||||
return new const PropertyTable();
|
return new const PropertyTable();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -148,6 +148,11 @@ std::string PeekPropertyName(const Element &element) {
|
|||||||
PropertyTable::PropertyTable() {
|
PropertyTable::PropertyTable() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
PropertyTable::PropertyTable(const PropertyTable *templateProps) :
|
||||||
|
templateProps(templateProps), element() {
|
||||||
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
PropertyTable::PropertyTable(const ElementPtr element, const PropertyTable *templateProps) :
|
PropertyTable::PropertyTable(const ElementPtr element, const PropertyTable *templateProps) :
|
||||||
templateProps(templateProps), element(element) {
|
templateProps(templateProps), element(element) {
|
||||||
|
|||||||
@@ -137,6 +137,7 @@ class PropertyTable {
|
|||||||
public:
|
public:
|
||||||
// in-memory property table with no source element
|
// in-memory property table with no source element
|
||||||
PropertyTable();
|
PropertyTable();
|
||||||
|
PropertyTable(const PropertyTable *templateProps);
|
||||||
PropertyTable(const ElementPtr element, const PropertyTable *templateProps);
|
PropertyTable(const ElementPtr element, const PropertyTable *templateProps);
|
||||||
~PropertyTable();
|
~PropertyTable();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user