Changeset 260431 in webkit
- Timestamp:
- Apr 21, 2020 9:21:31 AM (4 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r260425 r260431 1 2020-04-21 Charlie Turner <cturner@igalia.com> 2 3 [Clang 10] Fix warning: definition of implicit copy assignment operator for 'PageBlock' is deprecated because it has a user-declared copy constructor 4 https://bugs.webkit.org/show_bug.cgi?id=210748 5 6 Reviewed by Adrian Perez de Castro. 7 8 Recent Clang's will issue a warning if you declare an explicit 9 copy construction, but leave the compiler to fill in an implicit 10 assignment operator. I think this is to catch cases where you do 11 something exciting in an assignment operator/copy constructor and 12 forget to do the same exciting thing in the other. 13 14 * wtf/PageAllocation.h: Import the base's constructor to avoid 15 defining our own identical one. 16 * wtf/PageBlock.h: Remove trivial constructor and replace with 17 member initializers. Remove copy constructor. This looks identical 18 to what the compiler would generate anyway. 19 1 20 2020-04-21 Claudio Saavedra <csaavedra@igalia.com> 2 21 -
trunk/Source/WTF/wtf/PageAllocation.h
r237099 r260431 70 70 class PageAllocation : private PageBlock { 71 71 public: 72 PageAllocation() 73 { 74 } 75 72 using PageBlock::PageBlock; 76 73 using PageBlock::size; 77 74 using PageBlock::base; -
trunk/Source/WTF/wtf/PageBlock.h
r260179 r260431 67 67 WTF_MAKE_FAST_ALLOCATED; 68 68 public: 69 PageBlock(); 70 PageBlock(const PageBlock&); 69 PageBlock() = default; 71 70 PageBlock(void*, size_t, bool hasGuardPages); 72 71 … … 83 82 84 83 private: 85 void* m_realBase ;86 void* m_base ;87 size_t m_size ;84 void* m_realBase { nullptr }; 85 void* m_base { nullptr }; 86 size_t m_size { 0 }; 88 87 }; 89 90 inline PageBlock::PageBlock()91 : m_realBase(0)92 , m_base(0)93 , m_size(0)94 {95 }96 97 inline PageBlock::PageBlock(const PageBlock& other)98 : m_realBase(other.m_realBase)99 , m_base(other.m_base)100 , m_size(other.m_size)101 {102 }103 88 104 89 inline PageBlock::PageBlock(void* base, size_t size, bool hasGuardPages)
Note: See TracChangeset
for help on using the changeset viewer.