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

Side by Side Diff: Source/wtf/OwnPtr.h

Issue 763173003: Convert RenderBlockFlow code to use FloatingObject references (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address Review Comments Created 5 years, 9 months 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Intel Corporation. All rights reserved. 3 * Copyright (C) 2013 Intel Corporation. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 OwnPtr(HashTableDeletedValueType) : m_ptr(hashTableDeletedValue()) { } 49 OwnPtr(HashTableDeletedValueType) : m_ptr(hashTableDeletedValue()) { }
50 bool isHashTableDeletedValue() const { return m_ptr == hashTableDeletedV alue(); } 50 bool isHashTableDeletedValue() const { return m_ptr == hashTableDeletedV alue(); }
51 51
52 ~OwnPtr() 52 ~OwnPtr()
53 { 53 {
54 OwnedPtrDeleter<T>::deletePtr(m_ptr); 54 OwnedPtrDeleter<T>::deletePtr(m_ptr);
55 m_ptr = 0; 55 m_ptr = 0;
56 } 56 }
57 57
58 PtrType get() const { return m_ptr; } 58 PtrType get() const { return m_ptr; }
59 ValueType& getReference() const { ASSERT(m_ptr); return *m_ptr; };
Julien - ping for review 2015/03/16 15:27:54 Note that this is basically operator* so it seems
Sunil Ratnu 2015/03/17 11:31:19 Done. Now using operator* itself instead of the ne
59 60
60 void clear(); 61 void clear();
61 PassOwnPtr<T> release(); 62 PassOwnPtr<T> release();
62 PtrType leakPtr() WARN_UNUSED_RETURN; 63 PtrType leakPtr() WARN_UNUSED_RETURN;
63 64
64 ValueType& operator*() const { ASSERT(m_ptr); return *m_ptr; } 65 ValueType& operator*() const { ASSERT(m_ptr); return *m_ptr; }
65 PtrType operator->() const { ASSERT(m_ptr); return m_ptr; } 66 PtrType operator->() const { ASSERT(m_ptr); return m_ptr; }
66 67
67 ValueType& operator[](std::ptrdiff_t i) const; 68 ValueType& operator[](std::ptrdiff_t i) const;
68 69
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 template<typename T> inline typename OwnPtr<T>::PtrType getPtr(const OwnPtr< T>& p) 217 template<typename T> inline typename OwnPtr<T>::PtrType getPtr(const OwnPtr< T>& p)
217 { 218 {
218 return p.get(); 219 return p.get();
219 } 220 }
220 221
221 } // namespace WTF 222 } // namespace WTF
222 223
223 using WTF::OwnPtr; 224 using WTF::OwnPtr;
224 225
225 #endif // WTF_OwnPtr_h 226 #endif // WTF_OwnPtr_h
OLDNEW
« Source/core/layout/LayoutBlockFlowLine.cpp ('K') | « Source/core/paint/BlockFlowPainter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698