Use DCHECK_IS_ON() instead of !NDEBUG for debug logic (issue #1961)

This commit is contained in:
Marshall Greenblatt
2016-09-01 14:24:30 +03:00
parent ad1619dbd7
commit 5068b50b48
278 changed files with 320 additions and 525 deletions

View File

@ -762,13 +762,13 @@ void CefMenuModelImpl::InsertItemAt(const Item& item, int index) {
}
void CefMenuModelImpl::ValidateItem(const Item& item) {
#ifndef NDEBUG
#if DCHECK_IS_ON()
if (item.type_ == MENUITEMTYPE_SEPARATOR) {
DCHECK_EQ(item.command_id_, kSeparatorId);
} else {
DCHECK_GE(item.command_id_, 0);
}
#endif // NDEBUG
#endif
}
void CefMenuModelImpl::OnMenuClosed() {