MCPcopy Create free account
hub / github.com/comaps/comaps / Load

Method Load

libs/editor/editor_storage.cpp:36–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36bool 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
53bool LocalStorage::Reset()
54{

Callers 1

LoadEditsMethod · 0.45

Calls 2

GetEditorFilePathFunction · 0.85
resetMethod · 0.45

Tested by

no test coverage detected