From 97c7cf16de6e478f1975bb778ef3a963a52d9797 Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Mon, 7 Jan 2019 15:20:54 -0600 Subject: [PATCH] remove --undefok I think we originally added this for the bots, back in the good old days when the bot scripts weren't versioned with Skia. No bots use this now. Change-Id: Icdee95d27fb928d0215601e082d056e611eb6202 Reviewed-on: https://skia-review.googlesource.com/c/181980 Reviewed-by: Ben Wagner Commit-Queue: Ben Wagner --- bench/nanobench.cpp | 5 ----- dm/DM.cpp | 4 ---- tools/flags/SkCommandLineFlags.cpp | 10 ++-------- 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp index 35fcefac01..d9f24e5959 100644 --- a/bench/nanobench.cpp +++ b/bench/nanobench.cpp @@ -102,8 +102,6 @@ static SkString to_string(int n) { return str; } -DECLARE_bool(undefok); - DEFINE_int32(loops, kDefaultLoops, loops_help_txt().c_str()); DEFINE_int32(samples, 10, "Number of samples to measure for each bench."); @@ -503,13 +501,10 @@ void create_configs(SkTArray* configs) { // If no just default configs were requested, then we're okay. if (array.count() == 0 || FLAGS_config.count() == 0 || - // If we've been told to ignore undefined flags, we're okay. - FLAGS_undefok || // Otherwise, make sure that all specified configs have been created. array.count() == configs->count()) { return; } - SkDebugf("Invalid --config. Use --undefok to bypass this warning.\n"); exit(1); } diff --git a/dm/DM.cpp b/dm/DM.cpp index 6f63b369b6..10f239b263 100644 --- a/dm/DM.cpp +++ b/dm/DM.cpp @@ -63,7 +63,6 @@ extern void SkPDFImageDumpStats(); extern bool gSkForceRasterPipelineBlitter; -DECLARE_bool(undefok); DEFINE_string(src, "tests gm skp image", "Source types to test."); DEFINE_bool(nameByHash, false, "If true, write to FLAGS_writePath[0]/.png instead of " @@ -1016,13 +1015,10 @@ static bool gather_sinks(const GrContextOptions& grCtxOptions, bool defaultConfi if (configs.count() == 0 || // If we're using the default configs, we're okay. defaultConfigs || - // If we've been told to ignore undefined flags, we're okay. - FLAGS_undefok || // Otherwise, make sure that all specified configs have become sinks. configs.count() == gSinks.count()) { return true; } - info("Invalid --config. Use --undefok to bypass this warning.\n"); return false; } diff --git a/tools/flags/SkCommandLineFlags.cpp b/tools/flags/SkCommandLineFlags.cpp index 62625e1065..5be6d851e5 100644 --- a/tools/flags/SkCommandLineFlags.cpp +++ b/tools/flags/SkCommandLineFlags.cpp @@ -11,8 +11,6 @@ #include -DEFINE_bool(undefok, false, "Silently ignore unknown flags instead of crashing."); - template static void ignore_result(const T&) {} bool SkFlagInfo::CreateStringFlag(const char* name, const char* shortName, @@ -349,12 +347,8 @@ void SkCommandLineFlags::Parse(int argc, const char* const * argv) { i++; // skip YES } else #endif - if (FLAGS_undefok) { - SkDebugf("FYI: ignoring unknown flag '%s'.\n", argv[i]); - } else { - SkDebugf("Got unknown flag '%s'. Exiting.\n", argv[i]); - exit(-1); - } + SkDebugf("Got unknown flag '%s'. Exiting.\n", argv[i]); + exit(-1); } } }