| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 private: | 69 private: |
| 70 SharedFontFamily() {} | 70 SharedFontFamily() {} |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 PLATFORM_EXPORT bool operator==(const FontFamily&, const FontFamily&); | 73 PLATFORM_EXPORT bool operator==(const FontFamily&, const FontFamily&); |
| 74 inline bool operator!=(const FontFamily& a, const FontFamily& b) { | 74 inline bool operator!=(const FontFamily& a, const FontFamily& b) { |
| 75 return !(a == b); | 75 return !(a == b); |
| 76 } | 76 } |
| 77 | 77 |
| 78 inline FontFamily::~FontFamily() { | 78 inline FontFamily::~FontFamily() { |
| 79 RefPtr<SharedFontFamily> reaper = m_next.release(); | 79 RefPtr<SharedFontFamily> reaper = std::move(m_next); |
| 80 while (reaper && reaper->hasOneRef()) { | 80 while (reaper && reaper->hasOneRef()) { |
| 81 // implicitly protects reaper->next, then derefs reaper | 81 // implicitly protects reaper->next, then derefs reaper |
| 82 reaper = reaper->releaseNext(); | 82 reaper = reaper->releaseNext(); |
| 83 } | 83 } |
| 84 } | 84 } |
| 85 | 85 |
| 86 inline const FontFamily* FontFamily::next() const { | 86 inline const FontFamily* FontFamily::next() const { |
| 87 return m_next.get(); | 87 return m_next.get(); |
| 88 } | 88 } |
| 89 | 89 |
| 90 inline void FontFamily::appendFamily(PassRefPtr<SharedFontFamily> family) { | 90 inline void FontFamily::appendFamily(PassRefPtr<SharedFontFamily> family) { |
| 91 m_next = family; | 91 m_next = family; |
| 92 } | 92 } |
| 93 | 93 |
| 94 inline PassRefPtr<SharedFontFamily> FontFamily::releaseNext() { | 94 inline PassRefPtr<SharedFontFamily> FontFamily::releaseNext() { |
| 95 return m_next.release(); | 95 return std::move(m_next); |
| 96 } | 96 } |
| 97 | 97 |
| 98 } // namespace blink | 98 } // namespace blink |
| 99 | 99 |
| 100 #endif | 100 #endif |
| OLD | NEW |