Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(558)

Unified Diff: Source/core/layout/LayoutTableSection.cpp

Issue 1339633002: Remove tautological comparison in CellSpan::ensureConsistency (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutTableSection.cpp
diff --git a/Source/core/layout/LayoutTableSection.cpp b/Source/core/layout/LayoutTableSection.cpp
index f8e4c0b3927abd5e0178c2ee1c8cbc06a382e505..afb1424af20b17dd535baaf7b8b72eb90a7b5c23 100644
--- a/Source/core/layout/LayoutTableSection.cpp
+++ b/Source/core/layout/LayoutTableSection.cpp
@@ -80,8 +80,10 @@ row, const LayoutTableCell* cell)
void CellSpan::ensureConsistency(const unsigned maximumSpanSize)
{
- RELEASE_ASSERT(m_start >= 0 && m_start <= maximumSpanSize);
- RELEASE_ASSERT(m_end >= 0 && m_end <= maximumSpanSize);
+ static_assert(WTF::IsSameType<decltype(m_start), unsigned>::value, "Asserts below assume m_start is unsigned");
+ static_assert(WTF::IsSameType<decltype(m_end), unsigned>::value, "Asserts below assume m_end is unsigned");
+ RELEASE_ASSERT(m_start <= maximumSpanSize);
+ RELEASE_ASSERT(m_end <= maximumSpanSize);
RELEASE_ASSERT(m_start <= m_end);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698