| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999 Lars Knoll (knoll@kde.org) | 2 * (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 125 |
| 126 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES) | 126 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES) |
| 127 // We have to declare the copy constructor and copy assignment operator as w
ell, otherwise | 127 // We have to declare the copy constructor and copy assignment operator as w
ell, otherwise |
| 128 // they'll be implicitly deleted by adding the move constructor and move ass
ignment operator. | 128 // they'll be implicitly deleted by adding the move constructor and move ass
ignment operator. |
| 129 String(const String& other) : m_impl(other.m_impl) { } | 129 String(const String& other) : m_impl(other.m_impl) { } |
| 130 String(String&& other) : m_impl(other.m_impl.release()) { } | 130 String(String&& other) : m_impl(other.m_impl.release()) { } |
| 131 String& operator=(const String& other) { m_impl = other.m_impl; return *this
; } | 131 String& operator=(const String& other) { m_impl = other.m_impl; return *this
; } |
| 132 String& operator=(String&& other) { m_impl = other.m_impl.release(); return
*this; } | 132 String& operator=(String&& other) { m_impl = other.m_impl.release(); return
*this; } |
| 133 #endif | 133 #endif |
| 134 | 134 |
| 135 // Inline the destructor. | |
| 136 ALWAYS_INLINE ~String() { } | |
| 137 | |
| 138 void swap(String& o) { m_impl.swap(o.m_impl); } | 135 void swap(String& o) { m_impl.swap(o.m_impl); } |
| 139 | 136 |
| 140 template<typename CharType> | 137 template<typename CharType> |
| 141 static String adopt(StringBuffer<CharType>& buffer) | 138 static String adopt(StringBuffer<CharType>& buffer) |
| 142 { | 139 { |
| 143 if (!buffer.length()) | 140 if (!buffer.length()) |
| 144 return StringImpl::empty(); | 141 return StringImpl::empty(); |
| 145 return String(buffer.release()); | 142 return String(buffer.release()); |
| 146 } | 143 } |
| 147 | 144 |
| (...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 using WTF::charactersToFloat; | 693 using WTF::charactersToFloat; |
| 697 using WTF::equal; | 694 using WTF::equal; |
| 698 using WTF::equalIgnoringCase; | 695 using WTF::equalIgnoringCase; |
| 699 using WTF::find; | 696 using WTF::find; |
| 700 using WTF::isAllSpecialCharacters; | 697 using WTF::isAllSpecialCharacters; |
| 701 using WTF::isSpaceOrNewline; | 698 using WTF::isSpaceOrNewline; |
| 702 using WTF::reverseFind; | 699 using WTF::reverseFind; |
| 703 | 700 |
| 704 #include "wtf/text/AtomicString.h" | 701 #include "wtf/text/AtomicString.h" |
| 705 #endif // WTFString_h | 702 #endif // WTFString_h |
| OLD | NEW |