Index: lib/registry.dart |
diff --git a/lib/registry.dart b/lib/registry.dart |
index 9e87c11132aab1cd79b2eddb2dd9b89d839c19be..fd952fd8c9c913b91a675321c76f4237864f2232 100644 |
--- a/lib/registry.dart |
+++ b/lib/registry.dart |
@@ -74,7 +74,7 @@ class Registry<T> { |
* has failed. |
*/ |
Registry.fromPort(SendPort commandPort, |
- {Duration timeout: const Duration(seconds: 5)}) |
+ {Duration timeout: const Duration(seconds: 5)}) |
Lasse Reichstein Nielsen
2015/02/26 10:59:14
Indent '{' to after '('.
|
: _commandPort = commandPort, |
_timeout = timeout; |
@@ -259,7 +259,7 @@ class _RegistryCache { |
return result; |
} |
- Object operator[](int id) => id2object[id]; |
+ Object operator [](int id) => id2object[id]; |
// Register a pair of id/object in the cache. |
// if the id is already in the cache, just return the existing |
@@ -274,7 +274,7 @@ class _RegistryCache { |
bool isAdding(element) => object2id[element] == _BEING_ADDED; |
- void setAdding(element) { |
+ void setAdding(element) { |
assert(!contains(element)); |
object2id[element] = _BEING_ADDED; |
} |
@@ -319,7 +319,7 @@ class RegistryManager { |
RegistryManager({timeout: const Duration(seconds: 5)}) |
: _timeout = timeout, |
_commandPort = new RawReceivePort() { |
- _commandPort.handler = _handleCommand; |
+ _commandPort.handler = _handleCommand; |
} |
/** |
@@ -336,14 +336,14 @@ class RegistryManager { |
* This registry can be sent to other isolates created using |
* [Isolate.spawn]. |
*/ |
- Registry get registry => new Registry.fromPort(_commandPort.sendPort, |
- timeout: _timeout); |
+ Registry get registry => |
+ new Registry.fromPort(_commandPort.sendPort, timeout: _timeout); |
// Used as argument to putIfAbsent. |
static Set _createSet() => new HashSet(); |
void _handleCommand(List command) { |
- switch(command[0]) { |
+ switch (command[0]) { |
case _ADD: |
_add(command[1], command[2], command[3]); |
return; |
@@ -398,7 +398,7 @@ class RegistryManager { |
assert(tags.isNotEmpty); |
for (int id in ids) { |
_RegistryEntry entry = _entries[id]; |
- if (entry == null) continue; // Entry was removed. |
+ if (entry == null) continue; // Entry was removed. |
Lasse Reichstein Nielsen
2015/02/26 10:59:14
Two spaces before '//'.
|
entry.tags.addAll(tags); |
for (var tag in tags) { |
Set ids = _tag2id.putIfAbsent(tag, _createSet); |
@@ -413,7 +413,7 @@ class RegistryManager { |
assert(tags.isNotEmpty); |
for (int id in ids) { |
_RegistryEntry entry = _entries[id]; |
- if (entry == null) continue; // Object was removed. |
+ if (entry == null) continue; // Object was removed. |
Lasse Reichstein Nielsen
2015/02/26 10:59:15
Ditto.
|
entry.tags.removeAll(tags); |
} |
for (var tag in tags) { |
@@ -467,7 +467,7 @@ class RegistryManager { |
return; |
} |
var matchingIds = _findTaggedIds(tags); |
- if (max == null) max = matchingIds.length; // All results. |
+ if (max == null) max = matchingIds.length; // All results. |
Lasse Reichstein Nielsen
2015/02/26 10:59:15
And ditto on the spaces.
|
for (var id in matchingIds) { |
result.add(id); |
result.add(_entries[id].element); |