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

Unified Diff: lib/src/parsed_path.dart

Issue 1038063002: DDC fixes for path (Closed) Base URL: https://github.com/dart-lang/path.git@master
Patch Set: Fix formatting 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/context.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/parsed_path.dart
diff --git a/lib/src/parsed_path.dart b/lib/src/parsed_path.dart
index b853eb1a1ac461e0c0bf2915a15b27e45dbcb441..d37e2d396211dcc195d103c8e7df1326c220f60a 100644
--- a/lib/src/parsed_path.dart
+++ b/lib/src/parsed_path.dart
@@ -47,8 +47,8 @@ class ParsedPath {
if (root != null) path = path.substring(root.length);
// Split the parts on path separators.
- var parts = [];
- var separators = [];
+ var parts = <String>[];
+ var separators = <String>[];
var start = 0;
@@ -102,7 +102,7 @@ class ParsedPath {
void normalize() {
// Handle '.', '..', and empty parts.
var leadingDoubles = 0;
- var newParts = [];
+ var newParts = <String>[];
for (var part in parts) {
if (part == '.' || part == '') {
// Do nothing. Ignore it.
@@ -130,7 +130,7 @@ class ParsedPath {
}
// Canonicalize separators.
- var newSeparators = new List.generate(
+ var newSeparators = new List<String>.generate(
newParts.length, (_) => style.separator, growable: true);
newSeparators.insert(0, isAbsolute &&
newParts.length > 0 &&
« no previous file with comments | « lib/src/context.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698