Merge pull request #19907 from benj5378/getAttribute

Base: make getAttribute template
This commit is contained in:
Chris Hennes
2025-05-12 10:39:55 -05:00
committed by GitHub
64 changed files with 834 additions and 677 deletions

View File

@@ -387,10 +387,10 @@ class DocumentItem::ExpandInfo :
public:
void restore(Base::XMLReader& reader) {
int level = reader.level();
int count = reader.getAttributeAsInteger("count");
int count = reader.getAttribute<long>("count");
for (int i = 0; i < count; ++i) {
reader.readElement("Expand");
auto& entry = (*this)[reader.getAttribute("name")];
auto& entry = (*this)[reader.getAttribute<const char*>("name")];
if (!reader.hasAttribute("count"))
continue;
entry.reset(new ExpandInfo);