MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / ConvertArgv

Function ConvertArgv

source/MRViewer/MRConsoleWindows.cpp:12–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10{
11
12std::vector<std::string> ConvertArgv()
13{
14 int argc = 0;
15
16 LPWSTR* argvW = CommandLineToArgvW( GetCommandLineW(), &argc );
17 if ( !argvW )
18 {
19 assert( false );
20 return {};
21 }
22
23 std::vector<std::string> arguments;
24 arguments.reserve( argc );
25 for ( int i = 0; i < argc; ++i )
26 arguments.push_back( MR::Utf16ToUtf8( argvW[i] ) );
27 return arguments;
28}
29
30ConsoleRunner::ConsoleRunner( bool runConsole ):
31 consoleStarted_{ runConsole }

Callers 1

WinMainFunction · 0.85

Calls 3

Utf16ToUtf8Function · 0.85
push_backMethod · 0.80
reserveMethod · 0.45

Tested by

no test coverage detected