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

Unified Diff: utils/css/source.dart

Issue 12473003: Remove deprecated StringBuffer.add, addAll and addCharCode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: utils/css/source.dart
diff --git a/utils/css/source.dart b/utils/css/source.dart
index a5e981b69ac8b1cb46a9bb8f63ce7ba161daee70..5eeb0e2a3c9d052ed0dbf45e9d7c08d35b2de3c4 100644
--- a/utils/css/source.dart
+++ b/utils/css/source.dart
@@ -80,7 +80,7 @@ class SourceFile implements Comparable<SourceFile> {
var buf = new StringBuffer(
'${filename}:${line + 1}:${column + 1}: $message');
if (includeText) {
- buf.add('\n');
+ buf.write('\n');
var textLine;
// +1 for 0-indexing, +1 again to avoid the last line of the file
if ((line + 2) < _lineStarts.length) {
@@ -91,25 +91,25 @@ class SourceFile implements Comparable<SourceFile> {
int toColumn = Math.min(column + (end-start), textLine.length);
if (options.useColors) {
- buf.add(textLine.substring(0, column));
- buf.add(_RED_COLOR);
- buf.add(textLine.substring(column, toColumn));
- buf.add(_NO_COLOR);
- buf.add(textLine.substring(toColumn));
+ buf.write(textLine.substring(0, column));
+ buf.write(_RED_COLOR);
+ buf.write(textLine.substring(column, toColumn));
+ buf.write(_NO_COLOR);
+ buf.write(textLine.substring(toColumn));
} else {
- buf.add(textLine);
+ buf.write(textLine);
}
int i = 0;
for (; i < column; i++) {
- buf.add(' ');
+ buf.write(' ');
}
- if (options.useColors) buf.add(_RED_COLOR);
+ if (options.useColors) buf.write(_RED_COLOR);
for (; i < toColumn; i++) {
- buf.add('^');
+ buf.write('^');
}
- if (options.useColors) buf.add(_NO_COLOR);
+ if (options.useColors) buf.write(_NO_COLOR);
}
return buf.toString();

Powered by Google App Engine
This is Rietveld 408576698