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

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: 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') | tests/lib/convert/line_splitter_test.dart » ('J')
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..0fa7c7f5c379376e3aa69955aa004fbb204a4f99 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)) {
Lasse Reichstein Nielsen 2013/08/13 09:05:55 Indent to align with "String chunk".
kevmoo-old 2013/08/13 18:47:16 Done.
+
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') | tests/lib/convert/line_splitter_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698