MCPcopy Create free account
hub / github.com/OpenCppCoverage/OpenCppCoverage / CreateCommandLine

Function CreateCommandLine

CppCoverage/Process.cpp:34–55  ·  view source on GitHub ↗

---------------------------------------------------------------------

Source from the content-addressed store, hash-verified

32 {
33 //---------------------------------------------------------------------
34 boost::optional<std::vector<wchar_t>>
35 CreateCommandLine(const std::vector<std::wstring>& arguments)
36 {
37 boost::optional<std::vector<wchar_t>> commandLine;
38
39 if (!arguments.empty())
40 {
41 std::vector<wchar_t> buffer;
42 for (const auto& argument : arguments)
43 {
44 buffer.push_back(L'\"');
45 buffer.insert(buffer.end(), argument.begin(), argument.end());
46 buffer.push_back(L'\"');
47 buffer.push_back(L' ');
48 }
49
50 buffer.push_back(L'\0');
51 return buffer;
52 }
53
54 return commandLine;
55 }
56 }
57
58 const std::wstring Process::CannotFindPathMessage = L"Cannot find path: ";

Callers 1

StartMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected