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

Unified Diff: Source/platform/text/TextBreakIterator.h

Issue 813883002: replace COMPILE_ASSERT with static_assert in platform/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: final fixups Created 6 years 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 | « Source/platform/text/BidiContext.cpp ('k') | Source/platform/text/TextRun.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/text/TextBreakIterator.h
diff --git a/Source/platform/text/TextBreakIterator.h b/Source/platform/text/TextBreakIterator.h
index 71d1e3e5c062d9f8fd62f5291851cf37bf6d2ce5..daedaa79e902bb6ce2a859d1e449426b608303c2 100644
--- a/Source/platform/text/TextBreakIterator.h
+++ b/Source/platform/text/TextBreakIterator.h
@@ -81,33 +81,33 @@ public:
UChar lastCharacter() const
{
- COMPILE_ASSERT(WTF_ARRAY_LENGTH(m_priorContext) == 2, TextBreakIterator_unexpected_prior_context_length);
+ static_assert(WTF_ARRAY_LENGTH(m_priorContext) == 2, "TextBreakIterator has unexpected prior context length");
return m_priorContext[1];
}
UChar secondToLastCharacter() const
{
- COMPILE_ASSERT(WTF_ARRAY_LENGTH(m_priorContext) == 2, TextBreakIterator_unexpected_prior_context_length);
+ static_assert(WTF_ARRAY_LENGTH(m_priorContext) == 2, "TextBreakIterator has unexpected prior context length");
return m_priorContext[0];
}
void setPriorContext(UChar last, UChar secondToLast)
{
- COMPILE_ASSERT(WTF_ARRAY_LENGTH(m_priorContext) == 2, TextBreakIterator_unexpected_prior_context_length);
+ static_assert(WTF_ARRAY_LENGTH(m_priorContext) == 2, "TextBreakIterator has unexpected prior context length");
m_priorContext[0] = secondToLast;
m_priorContext[1] = last;
}
void updatePriorContext(UChar last)
{
- COMPILE_ASSERT(WTF_ARRAY_LENGTH(m_priorContext) == 2, TextBreakIterator_unexpected_prior_context_length);
+ static_assert(WTF_ARRAY_LENGTH(m_priorContext) == 2, "TextBreakIterator has unexpected prior context length");
m_priorContext[0] = m_priorContext[1];
m_priorContext[1] = last;
}
void resetPriorContext()
{
- COMPILE_ASSERT(WTF_ARRAY_LENGTH(m_priorContext) == 2, TextBreakIterator_unexpected_prior_context_length);
+ static_assert(WTF_ARRAY_LENGTH(m_priorContext) == 2, "TextBreakIterator has unexpected prior context length");
m_priorContext[0] = 0;
m_priorContext[1] = 0;
}
@@ -115,7 +115,7 @@ public:
unsigned priorContextLength() const
{
unsigned priorContextLength = 0;
- COMPILE_ASSERT(WTF_ARRAY_LENGTH(m_priorContext) == 2, TextBreakIterator_unexpected_prior_context_length);
+ static_assert(WTF_ARRAY_LENGTH(m_priorContext) == 2, "TextBreakIterator has unexpected prior context length");
if (m_priorContext[1]) {
++priorContextLength;
if (m_priorContext[0])
« no previous file with comments | « Source/platform/text/BidiContext.cpp ('k') | Source/platform/text/TextRun.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698