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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/source_file.dart

Issue 12294028: Fix warnings spotted by dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 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: dart/sdk/lib/_internal/compiler/implementation/source_file.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/source_file.dart b/dart/sdk/lib/_internal/compiler/implementation/source_file.dart
index 14a41756274ac8bb6ef47e56fe3ee6dbf067a75c..ca6d614ce5ef74710d6e998e0c4eec5452c205da 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/source_file.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/source_file.dart
@@ -76,7 +76,7 @@ class 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) {
@@ -86,17 +86,17 @@ class SourceFile {
}
int toColumn = min(column + (end-start), textLine.length);
- buf.add(textLine.substring(0, column));
- buf.add(color(textLine.substring(column, toColumn)));
- buf.add(textLine.substring(toColumn));
+ buf.write(textLine.substring(0, column));
+ buf.write(color(textLine.substring(column, toColumn)));
+ buf.write(textLine.substring(toColumn));
int i = 0;
for (; i < column; i++) {
- buf.add(' ');
+ buf.write(' ');
}
for (; i < toColumn; i++) {
- buf.add(color('^'));
+ buf.write(color('^'));
}
}

Powered by Google App Engine
This is Rietveld 408576698