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

Side by Side Diff: Source/platform/PODInterval.h

Issue 482753002: Use StringBuilder::appendLiteral() / StringBuilder::append(char) when possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/JSONValues.cpp ('k') | Source/platform/PODRedBlackTree.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 } 131 }
132 132
133 const T& maxHigh() const { return m_maxHigh; } 133 const T& maxHigh() const { return m_maxHigh; }
134 void setMaxHigh(const T& maxHigh) { m_maxHigh = maxHigh; } 134 void setMaxHigh(const T& maxHigh) { m_maxHigh = maxHigh; }
135 135
136 #ifndef NDEBUG 136 #ifndef NDEBUG
137 // Support for printing PODIntervals. 137 // Support for printing PODIntervals.
138 String toString() const 138 String toString() const
139 { 139 {
140 StringBuilder builder; 140 StringBuilder builder;
141 builder.append("[PODInterval ("); 141 builder.appendLiteral("[PODInterval (");
142 builder.append(ValueToString<T>::string(low())); 142 builder.append(ValueToString<T>::string(low()));
143 builder.append(", "); 143 builder.appendLiteral(", ");
144 builder.append(ValueToString<T>::string(high())); 144 builder.append(ValueToString<T>::string(high()));
145 builder.append("), data="); 145 builder.appendLiteral("), data=");
146 builder.append(ValueToString<UserData>::string(data())); 146 builder.append(ValueToString<UserData>::string(data()));
147 builder.append(", maxHigh="); 147 builder.appendLiteral(", maxHigh=");
148 builder.append(ValueToString<T>::string(maxHigh())); 148 builder.append(ValueToString<T>::string(maxHigh()));
149 builder.append("]"); 149 builder.append(']');
150 return builder.toString(); 150 return builder.toString();
151 } 151 }
152 #endif 152 #endif
153 153
154 private: 154 private:
155 T m_low; 155 T m_low;
156 T m_high; 156 T m_high;
157 UserData m_data; 157 UserData m_data;
158 T m_maxHigh; 158 T m_maxHigh;
159 }; 159 };
160 160
161 } // namespace blink 161 } // namespace blink
162 162
163 #endif // PODInterval_h 163 #endif // PODInterval_h
OLDNEW
« no previous file with comments | « Source/platform/JSONValues.cpp ('k') | Source/platform/PODRedBlackTree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698