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

Side by Side Diff: Source/wtf/text/AtomicString.cpp

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 unified diff | Download patch
« no previous file with comments | « Source/wtf/text/AtomicString.h ('k') | Source/wtf/text/StringImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2013 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2013 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> 3 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
4 * Copyright (C) 2012 Google Inc. All rights reserved. 4 * Copyright (C) 2012 Google Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 16 matching lines...) Expand all
27 #include "wtf/HashSet.h" 27 #include "wtf/HashSet.h"
28 #include "wtf/WTFThreadData.h" 28 #include "wtf/WTFThreadData.h"
29 #include "wtf/dtoa.h" 29 #include "wtf/dtoa.h"
30 #include "wtf/text/IntegerToStringConversion.h" 30 #include "wtf/text/IntegerToStringConversion.h"
31 #include "wtf/unicode/UTF8.h" 31 #include "wtf/unicode/UTF8.h"
32 32
33 namespace WTF { 33 namespace WTF {
34 34
35 using namespace Unicode; 35 using namespace Unicode;
36 36
37 COMPILE_ASSERT(sizeof(AtomicString) == sizeof(String), atomic_string_and_string_ must_be_same_size); 37 static_assert(sizeof(AtomicString) == sizeof(String), "AtomicString and String m ust be same size");
38 38
39 class AtomicStringTable { 39 class AtomicStringTable {
40 WTF_MAKE_NONCOPYABLE(AtomicStringTable); 40 WTF_MAKE_NONCOPYABLE(AtomicStringTable);
41 public: 41 public:
42 static AtomicStringTable* create(WTFThreadData& data) 42 static AtomicStringTable* create(WTFThreadData& data)
43 { 43 {
44 data.m_atomicStringTable = new AtomicStringTable; 44 data.m_atomicStringTable = new AtomicStringTable;
45 data.m_atomicStringTableDestructor = AtomicStringTable::destroy; 45 data.m_atomicStringTableDestructor = AtomicStringTable::destroy;
46 data.m_atomicStringTable->addStaticStrings(); 46 data.m_atomicStringTable->addStaticStrings();
47 return data.m_atomicStringTable; 47 return data.m_atomicStringTable;
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 } 507 }
508 508
509 #ifndef NDEBUG 509 #ifndef NDEBUG
510 void AtomicString::show() const 510 void AtomicString::show() const
511 { 511 {
512 m_string.show(); 512 m_string.show();
513 } 513 }
514 #endif 514 #endif
515 515
516 } // namespace WTF 516 } // namespace WTF
OLDNEW
« no previous file with comments | « Source/wtf/text/AtomicString.h ('k') | Source/wtf/text/StringImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698