fix(ui): improve const correctness across xml loading functions in ui

This commit is contained in:
fallenoak committed 2025-12-23 22:19:45 -06:00
1 parent d51ea7e0e0
commit 6732199eab
34 files changed
+76 -76

No files matched your search

+3 -3
View File
@@ -375,7 +375,7 @@ float CSimpleFontString::GetWidth() {
return v9 <= v4 ? v4 : v9;
}
void CSimpleFontString::LoadXML(XMLNode* node, CStatus* status) {
void CSimpleFontString::LoadXML(const XMLNode* node, CStatus* status) {
const char* inheritsAttr = node->GetAttributeByName("inherits");
if (inheritsAttr && *inheritsAttr) {
auto font = CSimpleFont::GetFont(inheritsAttr, 0);
@@ -451,7 +451,7 @@ void CSimpleFontString::LoadXML(XMLNode* node, CStatus* status) {
} else {
float fontHeight = 0.0f;
XMLNode* fontHeightNode = node->GetChildByName("FontHeight");
auto fontHeightNode = node->GetChildByName("FontHeight");
if (fontHeightNode) {
LoadXML_Value(fontHeightNode, fontHeight, status);
}
@@ -634,7 +634,7 @@ void CSimpleFontString::OnFrameSizeChanged(const CRect& rect) {
}
}
void CSimpleFontString::PostLoadXML(XMLNode* node, CStatus* status) {
void CSimpleFontString::PostLoadXML(const XMLNode* node, CStatus* status) {
if (this->m_parent) {
int32_t hasPoint = 0;