mirror of
https://github.com/OlafvdSpek/ctemplate.git
synced 2025-09-28 19:05:49 +08:00
LOG(FATAL) << "message" is preferred over CHECK("message" == NULL).
See http://wiki/Main/LogFatalVsCheckFalse for details. While I'm here, fix a couple of cases of CHECK("message" != NULL) and remove some dead code that our compilers are now smart enough to not need. R=falmeida DELTA=5 (0 added, 2 deleted, 3 changed) Revision created by MOE tool push_codebase. MOE_MIGRATION=3617
This commit is contained in:
parent
17339f2f43
commit
ba3cc774b8
|
@ -308,7 +308,7 @@ bool HtmlparserCppTest::StringToBool(const string &value) {
|
|||
} else if (strcasecmp(value.c_str(), "false") == 0) {
|
||||
return false;
|
||||
} else {
|
||||
CHECK("Unknown boolean value" == NULL);
|
||||
LOG(FATAL) << "Unknown boolean value";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -323,8 +323,7 @@ const char *HtmlparserCppTest::IdToName(const struct IdNameMap *list,
|
|||
}
|
||||
list++;
|
||||
}
|
||||
CHECK("Unknown id" != NULL);
|
||||
return NULL; // Unreachable.
|
||||
LOG(FATAL) << "Unknown id";
|
||||
}
|
||||
|
||||
// Returns the enum_id of the correspondent name by consulting an array of
|
||||
|
@ -338,8 +337,7 @@ int HtmlparserCppTest::NameToId(const struct IdNameMap *list,
|
|||
}
|
||||
list++;
|
||||
}
|
||||
CHECK("Unknown name" != NULL);
|
||||
return -1; // Unreachable.
|
||||
LOG(FATAL) << "Unknown name";
|
||||
}
|
||||
|
||||
// Validate the parser state against the provided state.
|
||||
|
|
Loading…
Reference in New Issue
Block a user