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) {
|
} else if (strcasecmp(value.c_str(), "false") == 0) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
CHECK("Unknown boolean value" == NULL);
|
LOG(FATAL) << "Unknown boolean value";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -323,8 +323,7 @@ const char *HtmlparserCppTest::IdToName(const struct IdNameMap *list,
|
||||||
}
|
}
|
||||||
list++;
|
list++;
|
||||||
}
|
}
|
||||||
CHECK("Unknown id" != NULL);
|
LOG(FATAL) << "Unknown id";
|
||||||
return NULL; // Unreachable.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the enum_id of the correspondent name by consulting an array of
|
// 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++;
|
list++;
|
||||||
}
|
}
|
||||||
CHECK("Unknown name" != NULL);
|
LOG(FATAL) << "Unknown name";
|
||||||
return -1; // Unreachable.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate the parser state against the provided state.
|
// Validate the parser state against the provided state.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user