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

Side by Side Diff: third_party/WebKit/Source/wtf/text/WTFString.h

Issue 2761693002: Wrapped PassRefPtrs in move where passed to RefPtr constructor. (Closed)
Patch Set: Added move wraps for multiple instances in 1 line. Created 3 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 * (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. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 String(const char* characters, unsigned length); 90 String(const char* characters, unsigned length);
91 91
92 // Construct a string with latin1 data, from a null-terminated source. 92 // Construct a string with latin1 data, from a null-terminated source.
93 String(const LChar* characters) 93 String(const LChar* characters)
94 : String(reinterpret_cast<const char*>(characters)) {} 94 : String(reinterpret_cast<const char*>(characters)) {}
95 String(const char* characters) 95 String(const char* characters)
96 : String(characters, characters ? strlen(characters) : 0) {} 96 : String(characters, characters ? strlen(characters) : 0) {}
97 97
98 // Construct a string referencing an existing StringImpl. 98 // Construct a string referencing an existing StringImpl.
99 String(StringImpl* impl) : m_impl(impl) {} 99 String(StringImpl* impl) : m_impl(impl) {}
100 String(PassRefPtr<StringImpl> impl) : m_impl(impl) {} 100 String(PassRefPtr<StringImpl> impl) : m_impl(std::move(impl)) {}
101 101
102 void swap(String& o) { m_impl.swap(o.m_impl); } 102 void swap(String& o) { m_impl.swap(o.m_impl); }
103 103
104 template <typename CharType> 104 template <typename CharType>
105 static String adopt(StringBuffer<CharType>& buffer) { 105 static String adopt(StringBuffer<CharType>& buffer) {
106 if (!buffer.length()) 106 if (!buffer.length())
107 return StringImpl::empty; 107 return StringImpl::empty;
108 return String(buffer.release()); 108 return String(buffer.release());
109 } 109 }
110 110
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 using WTF::String; 597 using WTF::String;
598 using WTF::emptyString; 598 using WTF::emptyString;
599 using WTF::emptyString16Bit; 599 using WTF::emptyString16Bit;
600 using WTF::charactersAreAllASCII; 600 using WTF::charactersAreAllASCII;
601 using WTF::equal; 601 using WTF::equal;
602 using WTF::find; 602 using WTF::find;
603 using WTF::isSpaceOrNewline; 603 using WTF::isSpaceOrNewline;
604 604
605 #include "wtf/text/AtomicString.h" 605 #include "wtf/text/AtomicString.h"
606 #endif // WTFString_h 606 #endif // WTFString_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/text/CString.h ('k') | third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698