MCPcopy Create free account
hub / github.com/chen3feng/toft / AppendEnvironments

Function AppendEnvironments

system/process/sub_process.cpp:168–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168static void AppendEnvironments(std::map<std::string, std::string>* envs,
169 const std::map<std::string, std::string>& append,
170 bool overwrite)
171{
172 if (overwrite) {
173 for (std::map<std::string, std::string>::const_iterator i = append.begin();
174 i != append.end(); ++i) {
175 (*envs)[i->first] = i->second;
176 }
177 } else {
178 envs->insert(append.begin(), append.end());
179 }
180}
181
182static void EnvironmentsToStringVector(
183 const std::map<std::string, std::string>& envs,

Callers 1

DoExecMethod · 0.85

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected