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

Unified Diff: Source/wtf/text/AtomicString.h

Issue 802203004: replace COMPILE_ASSERT with static assert in wtf/ (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/wtf/dtoa/utils.h ('k') | Source/wtf/text/AtomicString.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/text/AtomicString.h
diff --git a/Source/wtf/text/AtomicString.h b/Source/wtf/text/AtomicString.h
index 6ba49b7d141764590f7ff98768319844ac41636c..862bb3f7909105223e8b4faa3e96f2c2f166368b 100644
--- a/Source/wtf/text/AtomicString.h
+++ b/Source/wtf/text/AtomicString.h
@@ -65,8 +65,8 @@ public:
ALWAYS_INLINE AtomicString(const char (&characters)[charactersCount], ConstructFromLiteralTag)
: m_string(addFromLiteralData(characters, charactersCount - 1))
{
- COMPILE_ASSERT(charactersCount > 1, AtomicStringFromLiteralNotEmpty);
- COMPILE_ASSERT((charactersCount - 1 <= ((unsigned(~0) - sizeof(StringImpl)) / sizeof(LChar))), AtomicStringFromLiteralCannotOverflow);
+ static_assert(charactersCount > 1, "AtomicString FromLiteralData should not be empty");
+ static_assert((charactersCount - 1 <= ((unsigned(~0) - sizeof(StringImpl)) / sizeof(LChar))), "AtomicString FromLiteralData cannot overflow");
}
// Hash table deleted values, which are only constructed and never copied or destroyed.
« no previous file with comments | « Source/wtf/dtoa/utils.h ('k') | Source/wtf/text/AtomicString.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698