MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / main

Function main

Examples/HttpClientAsyncGet/HttpClientAsyncGet.cpp:151–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149} // namespace SC
150
151int main(int argc, char** argv)
152{
153 using namespace SC;
154 constexpr auto NumArgsMax = 10;
155 StringSpan args[NumArgsMax];
156 for (int idx = 1; idx < min(argc, NumArgsMax); ++idx)
157 {
158 args[idx - 1] = StringSpan::fromNullTerminated(argv[idx], StringEncoding::Utf8);
159 }
160 return SC::saneMain({args, static_cast<size_t>(min(argc - 1, NumArgsMax))}) ? 0 : -1;
161}

Callers

nothing calls this directly

Calls 2

fromNullTerminatedFunction · 0.85
saneMainFunction · 0.70

Tested by

no test coverage detected