MCPcopy Create free account
hub / github.com/MhmRdd/NoHello / setProp

Method setProp

module/src/main/cpp/PropertyManager.cpp:62–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62void PropertyManager::setProp(const std::string& key, const std::string& value) {
63 auto it = keyIndex.find(key);
64 if (it != keyIndex.end()) {
65 // Update existing
66 orderedProps[it->second].second = value;
67 } else {
68 // Append new
69 size_t idx = orderedProps.size();
70 orderedProps.emplace_back(key, value);
71 keyIndex[key] = idx;
72 }
73
74 saveToFile();
75}
76
77/* Optional implementations if needed later
78bool PropertyManager::hasProp(const std::string& key) const {

Callers 1

NoRootFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected