1
0
forked from mirrors/0ad

Return void from CGUI::Xeromyces_ReadObject

The returned value was never used.
Now all CGUI::Xeromyces_Read* functions return void.
This commit is contained in:
phosit
2025-06-25 20:13:18 +02:00
committed by Phosit
parent 50b76acdd5
commit f2dfb94b88
2 changed files with 4 additions and 7 deletions
+3 -6
View File
@@ -656,7 +656,8 @@ void CGUI::Xeromyces_ReadRootSetup(const XMBData& xmb, XMBElement element)
}
}
IGUIObject* CGUI::Xeromyces_ReadObject(const XMBData& xmb, XMBElement element, IGUIObject* pParent, std::vector<std::pair<CStr, CStr> >& NameSubst, std::unordered_set<VfsPath>& Paths, u32 nesting_depth)
void CGUI::Xeromyces_ReadObject(const XMBData& xmb, XMBElement element, IGUIObject* pParent,
std::vector<std::pair<CStr, CStr> >& NameSubst, std::unordered_set<VfsPath>& Paths, u32 nesting_depth)
{
ENSURE(pParent);
@@ -674,7 +675,7 @@ IGUIObject* CGUI::Xeromyces_ReadObject(const XMBData& xmb, XMBElement element, I
if (!object)
{
LOGERROR("GUI: Unrecognized object type \"%s\"", type.c_str());
return nullptr;
return;
}
// Cache some IDs for element attribute names, to avoid string comparisons
@@ -952,11 +953,7 @@ IGUIObject* CGUI::Xeromyces_ReadObject(const XMBData& xmb, XMBElement element, I
}
if (!AddObject(*pParent, *object))
{
delete object;
return nullptr;
}
return object;
}
void CGUI::Xeromyces_ReadRepeat(const XMBData& xmb, XMBElement element, IGUIObject* pParent, std::vector<std::pair<CStr, CStr> >& NameSubst, std::unordered_set<VfsPath>& Paths, u32 nesting_depth)
+1 -1
View File
@@ -455,7 +455,7 @@ private:
*
* @see LoadXmlFile()
*/
IGUIObject* Xeromyces_ReadObject(const XMBData& xmb, XMBElement element, IGUIObject* pParent,
void Xeromyces_ReadObject(const XMBData& xmb, XMBElement element, IGUIObject* pParent,
std::vector<std::pair<CStr, CStr> >& NameSubst, std::unordered_set<VfsPath>& Paths,
u32 nesting_depth);