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

Unified Diff: utils/template/tree.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/template/tree.dart
diff --git a/utils/template/tree.dart b/utils/template/tree.dart
index 8e4964593e8b074bb23edc0d862dccce1fc05d99..6fd1cf0972cd4f971c217c01040a8dbb81f02349 100644
--- a/utils/template/tree.dart
+++ b/utils/template/tree.dart
@@ -41,20 +41,18 @@ class TreeOutput {
void write(String s) {
for (int i=0; i < depth; i++) {
- buf.add(' ');
+ buf.write(' ');
}
- buf.add(s);
+ buf.write(s);
}
void writeln(String s) {
- write(s);
- buf.add('\n');
+ buf.writeln(s);
}
void heading(String name, span) {
write(name);
- buf.add(' (${span.locationText})');
- buf.add('\n');
+ buf.writeln(' (${span.locationText})');
}
String toValue(value) {
@@ -79,14 +77,13 @@ class TreeOutput {
void writeList(String label, List list) {
write(label + ': ');
if (list == null) {
- buf.add('null');
- buf.add('\n');
+ buf.writeln('null');
} else {
for (var item in list) {
- buf.add(item.toString());
- buf.add(', ');
+ buf.write(item.toString());
+ buf.write(', ');
}
- buf.add('\n');
+ buf.write('\n');
Anders Johnsen 2013/03/06 14:31:00 writeln('')?
floitsch 2013/03/08 13:18:39 Missed it before committing... Yes "writeln" would
}
}

Powered by Google App Engine
This is Rietveld 408576698