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

Issue 802203004: replace COMPILE_ASSERT with static assert in wtf/ (Closed)

Created:
6 years ago by Mostyn Bramley-Moore
Modified:
6 years ago
Reviewers:
Nico
CC:
blink-reviews, blink-reviews-wtf_chromium.org, aandrey+blink_chromium.org, Mikhail
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

replace COMPILE_ASSERT with static assert in wtf/ BUG=442514 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=187289

Patch Set 1 #

Total comments: 1

Patch Set 2 : improve static_assert messages #

Patch Set 3 : fixup #

Patch Set 4 : search/replace fixup #

Total comments: 10

Patch Set 5 : final fixups #

Unified diffs Side-by-side diffs Delta from patch set Stats (+215 lines, -215 lines) Patch
M Source/wtf/BloomFilter.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/wtf/HashTable.h View 1 2 3 4 2 chunks +4 lines, -4 lines 0 comments Download
M Source/wtf/ListHashSet.h View 1 2 3 4 3 chunks +3 lines, -3 lines 0 comments Download
M Source/wtf/OwnPtr.h View 1 2 3 4 6 chunks +9 lines, -9 lines 0 comments Download
M Source/wtf/OwnPtrCommon.h View 1 2 3 4 2 chunks +5 lines, -5 lines 0 comments Download
M Source/wtf/PartitionAlloc.cpp View 1 2 3 4 1 chunk +10 lines, -10 lines 0 comments Download
M Source/wtf/PassOwnPtr.h View 1 2 3 4 3 chunks +7 lines, -7 lines 0 comments Download
M Source/wtf/PassRefPtr.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/wtf/SizeLimits.cpp View 1 1 chunk +10 lines, -10 lines 0 comments Download
M Source/wtf/StdLibExtras.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/wtf/StringHasher.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/wtf/TypeTraits.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/wtf/TypeTraits.cpp View 1 2 3 3 chunks +140 lines, -140 lines 0 comments Download
M Source/wtf/Vector.h View 1 2 3 4 3 chunks +4 lines, -4 lines 0 comments Download
M Source/wtf/VectorTraits.h View 1 3 chunks +9 lines, -9 lines 0 comments Download
M Source/wtf/dtoa/utils.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/wtf/text/AtomicString.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M Source/wtf/text/AtomicString.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/wtf/text/StringImpl.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/wtf/text/TextCodec.h View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M Source/wtf/unicode/Unicode.h View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9 (2 generated)
Mostyn Bramley-Moore
@Nico: if https://codereview.chromium.org/805073002/ sticks, here's part of the patch to remove usage of COMPILE_ASSERT completely.
6 years ago (2014-12-16 00:43:47 UTC) #2
Nico
lgtm https://codereview.chromium.org/802203004/diff/1/Source/wtf/HashTable.h File Source/wtf/HashTable.h (right): https://codereview.chromium.org/802203004/diff/1/Source/wtf/HashTable.h#newcode996 Source/wtf/HashTable.h:996: static_assert(!Traits::emptyValueIsZero || !IsPolymorphic<KeyType>::value, "EmptyValueCannotBeZeroForThingsWithAVtable"); At least for things ...
6 years ago (2014-12-16 00:57:24 UTC) #3
Mostyn Bramley-Moore
> At least for things where it's obvious how to do it (like here), should ...
6 years ago (2014-12-16 10:30:39 UTC) #4
Nico
still lgtm. All comments below optional. https://codereview.chromium.org/802203004/diff/50001/Source/wtf/ListHashSet.h File Source/wtf/ListHashSet.h (right): https://codereview.chromium.org/802203004/diff/50001/Source/wtf/ListHashSet.h#newcode363 Source/wtf/ListHashSet.h:363: static_assert(sizeof(ListHashSetNode) == sizeof(ListHashSetNodeBase<ValueArg>), ...
6 years ago (2014-12-16 17:56:28 UTC) #5
Mostyn Bramley-Moore
https://codereview.chromium.org/802203004/diff/50001/Source/wtf/ListHashSet.h File Source/wtf/ListHashSet.h (right): https://codereview.chromium.org/802203004/diff/50001/Source/wtf/ListHashSet.h#newcode363 Source/wtf/ListHashSet.h:363: static_assert(sizeof(ListHashSetNode) == sizeof(ListHashSetNodeBase<ValueArg>), "Please add any fields to the ...
6 years ago (2014-12-16 19:00:37 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/802203004/70001
6 years ago (2014-12-16 19:01:17 UTC) #8
commit-bot: I haz the power
6 years ago (2014-12-16 21:20:29 UTC) #9
Message was sent while issue was closed.
Committed patchset #5 (id:70001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=187289

Powered by Google App Engine
This is Rietveld 408576698