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

Function StringVectorToCStringVector

system/process/sub_process.cpp:105–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105static void StringVectorToCStringVector(
106 const std::vector<std::string>& vs,
107 std::vector<const char*>* vcs)
108{
109 for (size_t i = 0; i < vs.size(); ++i) {
110 vcs->push_back(const_cast<char*>(vs[i].c_str()));
111 }
112 vcs->push_back(NULL);
113}
114
115static void SetArgWithShell(const std::string& cmdline,
116 std::vector<const char*>* cargs)

Callers 2

CreateMethod · 0.85
DoExecMethod · 0.85

Calls 2

push_backMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected