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

Method Save

libs/platform/string_storage_base.cpp:54–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54void StringStorageBase::Save() const
55{
56 try
57 {
58 FileWriter file(m_path);
59 for (auto const & value : m_values)
60 {
61 std::string line(value.first);
62 line += kKeyValueDelimChar;
63 line += value.second;
64 line += '\n';
65 file.Write(line.data(), line.size());
66 }
67 }
68 catch (RootException const & ex)
69 {
70 // Ignore all settings saving exceptions.
71 LOG(LWARNING, ("Saving settings:", ex.Msg()));
72 }
73}
74
75void StringStorageBase::Clear()
76{

Callers

nothing calls this directly

Calls 3

WriteMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected