MCPcopy Create free account
hub / github.com/OneMoreGres/ScreenTranslator / unpackSubstitutions

Function unpackSubstitutions

src/settings.cpp:81–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81Substitutions unpackSubstitutions(const QStringList& raw)
82{
83 const auto count = raw.size();
84 if (count < 3)
85 return {};
86
87 Substitutions result;
88 for (auto i = 0, end = raw.size(); i < end; i += 3) {
89 result.emplace(raw[i], Substitution{raw[i + 1], raw[i + 2]});
90 }
91 return result;
92}
93
94Substitutions loadLegacySubstitutions()
95{

Callers 1

loadMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected