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

Side by Side Diff: Source/core/rendering/InlineFlowBox.cpp

Issue 811843003: replace COMPILE_ASSERT with static_assert in core/rendering/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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/core/rendering/InlineBox.cpp ('k') | Source/core/rendering/InlineTextBox.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) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 30 matching lines...) Expand all
41 41
42 #include <math.h> 42 #include <math.h>
43 43
44 namespace blink { 44 namespace blink {
45 45
46 struct SameSizeAsInlineFlowBox : public InlineBox { 46 struct SameSizeAsInlineFlowBox : public InlineBox {
47 void* pointers[5]; 47 void* pointers[5];
48 uint32_t bitfields : 23; 48 uint32_t bitfields : 23;
49 }; 49 };
50 50
51 COMPILE_ASSERT(sizeof(InlineFlowBox) == sizeof(SameSizeAsInlineFlowBox), InlineF lowBox_should_stay_small); 51 static_assert(sizeof(InlineFlowBox) == sizeof(SameSizeAsInlineFlowBox), "InlineF lowBox should stay small");
52 52
53 #if ENABLE(ASSERT) 53 #if ENABLE(ASSERT)
54 54
55 InlineFlowBox::~InlineFlowBox() 55 InlineFlowBox::~InlineFlowBox()
56 { 56 {
57 if (!m_hasBadChildList) 57 if (!m_hasBadChildList)
58 for (InlineBox* child = firstChild(); child; child = child->nextOnLine() ) 58 for (InlineBox* child = firstChild(); child; child = child->nextOnLine() )
59 child->setHasBadParent(); 59 child->setHasBadParent();
60 } 60 }
61 61
(...skipping 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 ASSERT(child->prevOnLine() == prev); 1352 ASSERT(child->prevOnLine() == prev);
1353 prev = child; 1353 prev = child;
1354 } 1354 }
1355 ASSERT(prev == m_lastChild); 1355 ASSERT(prev == m_lastChild);
1356 #endif 1356 #endif
1357 } 1357 }
1358 1358
1359 #endif 1359 #endif
1360 1360
1361 } // namespace blink 1361 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/InlineBox.cpp ('k') | Source/core/rendering/InlineTextBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698