MCPcopy Create free account
hub / github.com/Predelnik/DSpellCheck / process_utf8

Method process_utf8

src/common/IniWorker.cpp:105–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105void IniWorker::process_utf8(const wchar_t *name, std::string &value, const char *default_value,
106 bool in_quotes) const {
107 switch (m_action) {
108 case Action::save: {
109 auto str = utf8_to_wstring(value.c_str());
110 process(name, str, utf8_to_wstring(default_value), in_quotes);
111 }
112 return;
113 case Action::load: {
114 std::wstring str;
115 process(name, str, utf8_to_wstring(default_value), in_quotes);
116 value = to_utf8_string(str);
117 }
118 }
119}
120
121void IniWorker::process(const wchar_t *name, bool &value, bool default_value) const {
122 auto int_value = value ? 1 : 0;

Callers

nothing calls this directly

Calls 3

utf8_to_wstringFunction · 0.85
to_utf8_stringFunction · 0.85
c_strMethod · 0.80

Tested by

no test coverage detected