MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / GetIntFromXml

Function GetIntFromXml

Source/Editor/ProjectInfo.cpp:74–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74int32 GetIntFromXml(const xml_node& parent, const PUGIXML_CHAR* name, const int32 defaultValue)
75{
76 const auto node = parent.child_value(name);
77 if (node)
78 {
79 XmlCharAsChar s(node);
80 int32 v;
81 if (!StringUtils::Parse(s.Str, &v))
82 {
83 return v;
84 }
85 }
86
87 return defaultValue;
88}
89
90bool ProjectInfo::SaveProject()
91{

Callers 1

LoadOldProjectMethod · 0.85

Calls 2

child_valueMethod · 0.80
ParseFunction · 0.50

Tested by

no test coverage detected