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

Side by Side Diff: third_party/WebKit/Source/wtf/text/StringConcatenate.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) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 class StringTypeAdapter<UChar> { 84 class StringTypeAdapter<UChar> {
85 DISALLOW_NEW(); 85 DISALLOW_NEW();
86 86
87 public: 87 public:
88 explicit StringTypeAdapter<UChar>(UChar buffer) : m_buffer(buffer) {} 88 explicit StringTypeAdapter<UChar>(UChar buffer) : m_buffer(buffer) {}
89 89
90 unsigned length() const { return 1; } 90 unsigned length() const { return 1; }
91 bool is8Bit() const { return m_buffer <= 0xff; } 91 bool is8Bit() const { return m_buffer <= 0xff; }
92 92
93 void writeTo(LChar* destination) const { 93 void writeTo(LChar* destination) const {
94 ASSERT(is8Bit()); 94 DCHECK(is8Bit());
95 *destination = static_cast<LChar>(m_buffer); 95 *destination = static_cast<LChar>(m_buffer);
96 } 96 }
97 97
98 void writeTo(UChar* destination) const { *destination = m_buffer; } 98 void writeTo(UChar* destination) const { *destination = m_buffer; }
99 99
100 private: 100 private:
101 const UChar m_buffer; 101 const UChar m_buffer;
102 }; 102 };
103 103
104 template <> 104 template <>
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 class StringTypeAdapter<AtomicString> : public StringTypeAdapter<StringView> { 220 class StringTypeAdapter<AtomicString> : public StringTypeAdapter<StringView> {
221 public: 221 public:
222 explicit StringTypeAdapter(const AtomicString& string) 222 explicit StringTypeAdapter(const AtomicString& string)
223 : StringTypeAdapter<StringView>(string) {} 223 : StringTypeAdapter<StringView>(string) {}
224 }; 224 };
225 225
226 } // namespace WTF 226 } // namespace WTF
227 227
228 #include "wtf/text/StringOperators.h" 228 #include "wtf/text/StringOperators.h"
229 #endif 229 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/text/StringBuffer.h ('k') | third_party/WebKit/Source/wtf/text/StringHash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698