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

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

Issue 2585673002: Replace ASSERT, ENABLE(ASSERT), and ASSERT_NOT_REACHED in wtf (Closed)
Patch Set: Fix an Asan issue with LinkedHashSetNodeBase::unlink Created 4 years 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) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2011. 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 template <typename StringType1, typename StringType2> 77 template <typename StringType1, typename StringType2>
78 bool StringAppend<StringType1, StringType2>::is8Bit() const { 78 bool StringAppend<StringType1, StringType2>::is8Bit() const {
79 StringTypeAdapter<StringType1> adapter1(m_string1); 79 StringTypeAdapter<StringType1> adapter1(m_string1);
80 StringTypeAdapter<StringType2> adapter2(m_string2); 80 StringTypeAdapter<StringType2> adapter2(m_string2);
81 return adapter1.is8Bit() && adapter2.is8Bit(); 81 return adapter1.is8Bit() && adapter2.is8Bit();
82 } 82 }
83 83
84 template <typename StringType1, typename StringType2> 84 template <typename StringType1, typename StringType2>
85 void StringAppend<StringType1, StringType2>::writeTo(LChar* destination) const { 85 void StringAppend<StringType1, StringType2>::writeTo(LChar* destination) const {
86 ASSERT(is8Bit()); 86 DCHECK(is8Bit());
87 StringTypeAdapter<StringType1> adapter1(m_string1); 87 StringTypeAdapter<StringType1> adapter1(m_string1);
88 StringTypeAdapter<StringType2> adapter2(m_string2); 88 StringTypeAdapter<StringType2> adapter2(m_string2);
89 adapter1.writeTo(destination); 89 adapter1.writeTo(destination);
90 adapter2.writeTo(destination + adapter1.length()); 90 adapter2.writeTo(destination + adapter1.length());
91 } 91 }
92 92
93 template <typename StringType1, typename StringType2> 93 template <typename StringType1, typename StringType2>
94 void StringAppend<StringType1, StringType2>::writeTo(UChar* destination) const { 94 void StringAppend<StringType1, StringType2>::writeTo(UChar* destination) const {
95 StringTypeAdapter<StringType1> adapter1(m_string1); 95 StringTypeAdapter<StringType1> adapter1(m_string1);
96 StringTypeAdapter<StringType2> adapter2(m_string2); 96 StringTypeAdapter<StringType2> adapter2(m_string2);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 template <typename U, typename V, typename W> 194 template <typename U, typename V, typename W>
195 StringAppend<StringAppend<U, V>, W> operator+(const StringAppend<U, V>& string1, 195 StringAppend<StringAppend<U, V>, W> operator+(const StringAppend<U, V>& string1,
196 W string2) { 196 W string2) {
197 return StringAppend<StringAppend<U, V>, W>(string1, string2); 197 return StringAppend<StringAppend<U, V>, W>(string1, string2);
198 } 198 }
199 199
200 } // namespace WTF 200 } // namespace WTF
201 201
202 #endif // StringOperators_h 202 #endif // StringOperators_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/text/StringImplCF.cpp ('k') | third_party/WebKit/Source/wtf/text/StringStatics.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698