| 35 | } |
| 36 | |
| 37 | uint32_t AssetLoadWarningParser::Load(const std::string& path) { |
| 38 | TiXmlDocument doc(path.c_str()); |
| 39 | doc.LoadFile(); |
| 40 | if (!doc.Error()) { |
| 41 | TiXmlElement* pRoot = doc.RootElement(); |
| 42 | if (pRoot) { |
| 43 | TiXmlElement* e = pRoot->FirstChildElement("AssetWarning"); |
| 44 | while (e) { |
| 45 | uint32_t flags; |
| 46 | string_flags_to_uint32(&flags, nullAsEmpty(e->Attribute("load_flags"))); |
| 47 | asset_warnings.insert(AssetWarning(nullAsEmpty(e->Attribute("path")), flags, nullAsEmpty(e->Attribute("asset_type")), nullAsEmpty(e->Attribute("level_name")))); |
| 48 | e = e->NextSiblingElement("AssetWarning"); |
| 49 | } |
| 50 | } |
| 51 | } |
| 52 | return 0; |
| 53 | } |
| 54 | |
| 55 | bool AssetLoadWarningParser::Save(const std::string& path) { |
| 56 | TiXmlDocument doc; |
nothing calls this directly
no test coverage detected