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

Unified Diff: pkg/barback/lib/src/transform_node.dart

Issue 18650004: Make Assets know their ID. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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: pkg/barback/lib/src/transform_node.dart
diff --git a/pkg/barback/lib/src/transform_node.dart b/pkg/barback/lib/src/transform_node.dart
index 49222be9e5af2e184eb0c45e30520ab2c55d53fd..9c9e5ab556edd4cdb0dfc8267909d9492d688b24 100644
--- a/pkg/barback/lib/src/transform_node.dart
+++ b/pkg/barback/lib/src/transform_node.dart
@@ -58,7 +58,7 @@ class TransformNode {
/// previous runs.
Future<TransformOutputs> apply() {
var newInputs = new Set<AssetNode>();
- var newOutputs = new Map<AssetId, Asset>();
+ var newOutputs = new Set<Asset>();
var transform = createTransform(this, newInputs, newOutputs);
return _transformer.apply(transform).catchError((error) {
// Catch all transformer errors and pipe them to the results stream.
@@ -84,7 +84,7 @@ class TransformNode {
_inputs = newInputs;
// See which outputs are missing from the last run.
- var outputIds = newOutputs.keys.toSet();
+ var outputIds = newOutputs.map((asset) => asset.id).toSet();
var removed = _outputs.difference(outputIds);
_outputs = outputIds;
@@ -97,7 +97,7 @@ class TransformNode {
/// applied.
class TransformOutputs {
/// The outputs that are new or were modified since the last run.
- final Map<AssetId, Asset> updated;
+ final Set<Asset> updated;
/// The outputs that were created by the previous run but were not generated
/// by the most recent run.

Powered by Google App Engine
This is Rietveld 408576698