MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / handleCommandLineArgsW

Method handleCommandLineArgsW

Engine/AppManagerPrivate.cpp:1224–1243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1222}
1223
1224void
1225AppManagerPrivate::handleCommandLineArgsW(int argc, wchar_t** argv)
1226{
1227 std::vector<std::string> utf8Args;
1228 if (argv) {
1229 for (int i = 0; i < argc; ++i) {
1230 std::wstring wide(argv[i]);
1231 std::string str = StrUtils::utf16_to_utf8(wide);
1232 assert(StrUtils::is_utf8(str.c_str()));
1233 utf8Args.push_back(str);
1234 }
1235 } else {
1236 // If the user didn't specify launch arguments (e.g unit testing),
1237 // At least append the binary path
1238 std::string path = ProcInfo::applicationDirPath(0);
1239 utf8Args.push_back(path);
1240 }
1241
1242 copyUtf8ArgsToMembers(utf8Args);
1243}
1244
1245NATRON_NAMESPACE_EXIT

Callers 1

loadWMethod · 0.80

Calls 3

utf16_to_utf8Function · 0.85
is_utf8Function · 0.85
push_backMethod · 0.45

Tested by

no test coverage detected