| 39 | } |
| 40 | |
| 41 | bool SettingsManager::loadSettingsFile(CString _fileName) |
| 42 | { |
| 43 | pugi::xml_document doc; |
| 44 | pugi::xml_parse_result result = doc.load_file(_fileName.c_str()); |
| 45 | |
| 46 | if (result) |
| 47 | { |
| 48 | if (std::string_view(doc.first_child().name()) == std::string_view(mDocument->document_element().name())) |
| 49 | mergeNodes(mDocument->document_element(), doc.first_child()); |
| 50 | } |
| 51 | else |
| 52 | { |
| 53 | // логировать если это ошибка формата xml |
| 54 | } |
| 55 | |
| 56 | return result; |
| 57 | } |
| 58 | |
| 59 | void SettingsManager::saveSettingsFile(CString _fileName) |
| 60 | { |
no test coverage detected