| 34 | } |
| 35 | |
| 36 | bool LocalStorage::Load(xml_document & doc) |
| 37 | { |
| 38 | auto const editorFilePath = GetEditorFilePath(); |
| 39 | |
| 40 | std::lock_guard<std::mutex> guard(m_mutex); |
| 41 | |
| 42 | auto const result = doc.load_file(editorFilePath.c_str()); |
| 43 | // Note: status_file_not_found is ok if a user has never made any edits. |
| 44 | if (result != status_ok && result != status_file_not_found) |
| 45 | { |
| 46 | LOG(LERROR, ("Can't load map edits from disk:", editorFilePath)); |
| 47 | return false; |
| 48 | } |
| 49 | |
| 50 | return true; |
| 51 | } |
| 52 | |
| 53 | bool LocalStorage::Reset() |
| 54 | { |
no test coverage detected