diff --git a/modules/angular2/src/change_detection/pipes/iterable_changes.ts b/modules/angular2/src/change_detection/pipes/iterable_changes.ts index c51cf33697..757a48106e 100644 --- a/modules/angular2/src/change_detection/pipes/iterable_changes.ts +++ b/modules/angular2/src/change_detection/pipes/iterable_changes.ts @@ -621,7 +621,7 @@ class _DuplicateMap { get isEmpty(): boolean { return MapWrapper.size(this.map) === 0; } - clear() { MapWrapper.clear(this.map); } + clear() { this.map.clear(); } toString(): string { return '_DuplicateMap(' + stringify(this.map) + ')'; } } diff --git a/modules/angular2/src/core/compiler/compiler.ts b/modules/angular2/src/core/compiler/compiler.ts index bd835d9761..bd6ecafb3d 100644 --- a/modules/angular2/src/core/compiler/compiler.ts +++ b/modules/angular2/src/core/compiler/compiler.ts @@ -52,8 +52,8 @@ export class CompilerCache { } clear(): void { - MapWrapper.clear(this._cache); - MapWrapper.clear(this._hostCache); + this._cache.clear(); + this._hostCache.clear(); } } diff --git a/modules/angular2/src/facade/collection.dart b/modules/angular2/src/facade/collection.dart index 3cb396eca6..04c9c28404 100644 --- a/modules/angular2/src/facade/collection.dart +++ b/modules/angular2/src/facade/collection.dart @@ -43,9 +43,6 @@ class MapWrapper { static void delete(Map m, k) { m.remove(k); } - static void clear(Map m) { - m.clear(); - } static void clearValues(Map m) { for (var k in m.keys) { m[k] = null; diff --git a/modules/angular2/src/facade/collection.ts b/modules/angular2/src/facade/collection.ts index a28eb7f240..1243da63ac 100644 --- a/modules/angular2/src/facade/collection.ts +++ b/modules/angular2/src/facade/collection.ts @@ -67,7 +67,6 @@ export class MapWrapper { static forEach(m: Map, fn: /*(V, K) => void*/ Function) { m.forEach(fn); } static size(m: Map) { return m.size; } static delete(m: Map, k: K) { m.delete(k); } - static clear(m: Map) { m.clear(); } static clearValues(m: Map) { _clearValues(m); } static iterable(m) { return m; } static keys(m: Map): List { return m.keys(); } diff --git a/modules/angular2/src/render/dom/shadow_dom/util.ts b/modules/angular2/src/render/dom/shadow_dom/util.ts index 779998f16a..1250b0f117 100644 --- a/modules/angular2/src/render/dom/shadow_dom/util.ts +++ b/modules/angular2/src/render/dom/shadow_dom/util.ts @@ -60,8 +60,8 @@ export function shimCssForComponent(cssText: string, componentId: string): strin // Reset the caches - used for tests only export function resetShadowDomCache() { - MapWrapper.clear(_componentUIDs); + _componentUIDs.clear(); _nextComponentUID = 0; - MapWrapper.clear(_sharedStyleTexts); + _sharedStyleTexts.clear(); _lastInsertedStyleEl = null; } diff --git a/modules/angular2/test/change_detection/pipes/keyvalue_changes_spec.ts b/modules/angular2/test/change_detection/pipes/keyvalue_changes_spec.ts index ac4b7ac3a3..6edf7d1b60 100644 --- a/modules/angular2/test/change_detection/pipes/keyvalue_changes_spec.ts +++ b/modules/angular2/test/change_detection/pipes/keyvalue_changes_spec.ts @@ -98,7 +98,7 @@ export function main() { .toEqual(kvChangesAsString( {map: ['a', 'd'], previous: ['a', 'b[BB->null]', 'd'], removals: ['b[BB->null]']})); - MapWrapper.clear(m); + m.clear(); changes.check(m); expect(changes.toString()) .toEqual(kvChangesAsString(