undefok -> bool

BUG=skia:

not waiting for (dead?) win builder
NOTRY=True
R=reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/348063002
This commit is contained in:
mtklein 2014-06-20 08:24:56 -07:00 committed by Commit bot
parent f6fb36eebc
commit 77a83962ac

View File

@ -8,7 +8,7 @@
#include "SkCommandLineFlags.h"
#include "SkTDArray.h"
DEFINE_string(undefok, "", "Silently ignore unknown flags listed here instead of crashing.");
DEFINE_bool(undefok, false, "Silently ignore unknown flags instead of crashing.");
bool SkFlagInfo::CreateStringFlag(const char* name, const char* shortName,
SkCommandLineFlags::StringArray* pStrings,
@ -291,7 +291,7 @@ void SkCommandLineFlags::Parse(int argc, char** argv) {
while (stripped.startsWith('-')) {
stripped.remove(0, 1);
}
if (!FLAGS_undefok.contains(stripped.c_str())) {
if (!FLAGS_undefok) {
SkDebugf("Got unknown flag \"%s\". Exiting.\n", argv[i]);
exit(-1);
}