MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / ParseCommandLineFlags

Function ParseCommandLineFlags

external/sentencepiece/src/init.h:32–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30
31namespace sentencepiece {
32inline void ParseCommandLineFlags(const char *usage, int *argc, char ***argv,
33 bool remove_arg = true) {
34 absl::SetProgramUsageMessage(*argv[0]);
35 const auto unused_args = absl::ParseCommandLine(*argc, *argv);
36
37 if (remove_arg) {
38 char **argv_val = *argv;
39 *argv = argv_val = argv_val + *argc - unused_args.size();
40 std::copy(unused_args.begin(), unused_args.end(), argv_val);
41 *argc = static_cast<int>(unused_args.size());
42 }
43
44 logging::SetMinLogLevel(absl::GetFlag(FLAGS_minloglevel));
45}
46
47inline void ShutdownLibrary() {
48 google::protobuf::ShutdownProtobufLibrary();

Callers 8

mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
TESTFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 5

copyFunction · 0.85
SetMinLogLevelFunction · 0.70
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by 2

mainFunction · 0.68
TESTFunction · 0.68