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

Unified Diff: lib/src/multisplit.dart

Issue 1000513002: Tweak formatting rules. Fix #211. (Closed) Base URL: https://github.com/dart-lang/dart_style.git@master
Patch Set: Update changelog. Created 5 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
« no previous file with comments | « lib/src/line_writer.dart ('k') | lib/src/source_visitor.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/multisplit.dart
diff --git a/lib/src/multisplit.dart b/lib/src/multisplit.dart
index fa2bf2cb6137e960dae2af9acea8ff839bf79e03..6ad598d1e87fc1a68d93d119250d76f39b71f44b 100644
--- a/lib/src/multisplit.dart
+++ b/lib/src/multisplit.dart
@@ -53,15 +53,16 @@ class Multisplit {
/// The [SplitParam] that controls all of the split chunks.
SplitParam get param => _param;
- SplitParam _param = new SplitParam();
+ SplitParam _param;
/// `true` if a hard newline has forced this multisplit to be split.
bool _isSplit = false;
final bool _separable;
- Multisplit(this.startChunk, {bool separable})
- : _separable = separable != null ? separable : false;
+ Multisplit(this.startChunk, {bool separable, int cost})
+ : _separable = separable != null ? separable : false,
+ _param = new SplitParam(cost);
/// Handles a hard split occurring in the middle of this multisplit.
///
@@ -78,7 +79,7 @@ class Multisplit {
_isSplit = true;
if (_separable) {
- _param = new SplitParam(param.cost);
+ _param = new SplitParam(_param.cost);
// Previous splits may still remain unsplit.
return null;
« no previous file with comments | « lib/src/line_writer.dart ('k') | lib/src/source_visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698