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

Unified Diff: sdk/lib/convert/line_splitter.dart

Issue 22860004: nits from cr 22070003 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: trailing whitespace Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/lib/convert/line_splitter_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/convert/line_splitter.dart
diff --git a/sdk/lib/convert/line_splitter.dart b/sdk/lib/convert/line_splitter.dart
index cc9ad943527479f6286d5f4e38f1357fb4c3140f..2676c59d7bdf6f211723717f612420081f593377 100644
--- a/sdk/lib/convert/line_splitter.dart
+++ b/sdk/lib/convert/line_splitter.dart
@@ -38,21 +38,23 @@ class _LineSplitterSink extends StringConversionSinkBase {
_LineSplitterSink(this._sink);
void addSlice(String chunk, int start, int end, bool isLast) {
- if(_carry != null) {
+ if (_carry != null) {
chunk = _carry + chunk.substring(start, end);
start = 0;
end = chunk.length;
_carry = null;
}
_carry = _addSlice(chunk, start, end, isLast, _sink.add);
- if(isLast) _sink.close();
+ if (isLast) _sink.close();
}
void close() {
addSlice('', 0, 0, true);
}
- static String _addSlice(String chunk, int start, int end, bool isLast, void adder(String val)) {
+ static String _addSlice(String chunk, int start, int end, bool isLast,
+ void adder(String val)) {
+
int pos = start;
while (pos < end) {
int skip = 0;
@@ -78,7 +80,7 @@ class _LineSplitterSink extends StringConversionSinkBase {
}
if (pos != start) {
var carry = chunk.substring(start, pos);
- if(isLast) {
+ if (isLast) {
// Add remaining
adder(carry);
} else {
« no previous file with comments | « no previous file | tests/lib/convert/line_splitter_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698