Skip to content

Commit

Permalink
fixed code around GetClassName
Browse files Browse the repository at this point in the history
  • Loading branch information
PredatorCZ committed Dec 9, 2023
1 parent e798352 commit a9ffdcf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/sdl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,8 @@ template <class HdrType> void ToXML(HdrType *hdr, pugi::xml_node root) {
snprintf(buffer, sizeof(buffer), "%X", hash);
node.append_attribute("resourceHash").set_value(buffer);
} else {
node.append_attribute("resourceType").set_value(clName.data());
std::string resNme(clName);
node.append_attribute("resourceType").set_value(resNme.c_str());
}
};

Expand Down
6 changes: 4 additions & 2 deletions src/xfs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@ void XFSClassDesc::ToXML(pugi::xml_node node) const {
snprintf(buffer, sizeof(buffer), "%X", hash);
cNode.append_attribute("hash").set_value(buffer);
} else {
cNode.append_attribute("name").set_value(className.data());
std::string resNme(className);
cNode.append_attribute("name").set_value(resNme.c_str());
}

for (auto &m : members) {
Expand Down Expand Up @@ -636,7 +637,8 @@ void XMLSetType(const XFSClassData &item, pugi::xml_node node) {
return;
}

attr.set_value(item.rtti->className.data());
std::string resNme(item.rtti->className);
attr.set_value(resNme.c_str());
}

void XFSImpl::RTTIToXML(pugi::xml_node node) {
Expand Down

0 comments on commit a9ffdcf

Please sign in to comment.