mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-01-12 21:21:05 +00:00
debugging: debug options can be turned off internally again
This commit is contained in:
parent
605bae5bf5
commit
10a746d8b1
@ -42,7 +42,8 @@ debugging_requested(const std::string &option,
|
||||
}
|
||||
|
||||
void
|
||||
request_debugging(const std::string &options) {
|
||||
request_debugging(const std::string &options,
|
||||
bool enable) {
|
||||
std::vector<std::string> all_options = split(options);
|
||||
|
||||
for (auto &one_option : all_options) {
|
||||
@ -51,6 +52,8 @@ request_debugging(const std::string &options) {
|
||||
continue;
|
||||
if (parts[0] == "!")
|
||||
s_debugging_options.clear();
|
||||
else if (!enable)
|
||||
s_debugging_options.erase(parts[0]);
|
||||
else
|
||||
s_debugging_options[parts[0]] = 1 == parts.size() ? std::string("") : parts[1];
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
bool debugging_requested(const char *option, std::string *arg = nullptr);
|
||||
bool debugging_requested(const std::string &option, std::string *arg = nullptr);
|
||||
void request_debugging(const std::string &options);
|
||||
void request_debugging(const std::string &options, bool enable = true);
|
||||
void init_debugging();
|
||||
|
||||
int parse_debug_interval_arg(const std::string &option, int default_value = 1000, int invalid_value = -1);
|
||||
|
Loading…
Reference in New Issue
Block a user