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

Unified Diff: utils/pub/version_solver.dart

Issue 11238035: Make isEmpty a getter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file with co19 issue number. Created 8 years, 2 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 | « utils/pub/pubspec.dart ('k') | utils/pub/yaml/yaml_map.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/version_solver.dart
diff --git a/utils/pub/version_solver.dart b/utils/pub/version_solver.dart
index 80f3d486a37a7594b104380c373e277fb9a5f4d5..bca6b4ace866b25b227028b2f350f87401f6566f 100644
--- a/utils/pub/version_solver.dart
+++ b/utils/pub/version_solver.dart
@@ -102,7 +102,7 @@ class VersionSolver {
Future processNextWorkItem(_) {
while (true) {
// Stop if we are done.
- if (_work.isEmpty()) return new Future.immediate(buildResults());
+ if (_work.isEmpty) return new Future.immediate(buildResults());
// If we appear to be stuck in a loop, then we probably have an unstable
// graph, bail. We guess this based on a rough heuristic that it should
@@ -545,7 +545,7 @@ class Dependency {
* one. If `false`, then it means this package is not part of the dependency
* graph and should be omitted.
*/
- bool get isDependedOn => !_refs.isEmpty();
+ bool get isDependedOn => !_refs.isEmpty;
/** The names of all the packages that depend on this dependency. */
Collection<String> get dependers => _refs.getKeys();
@@ -556,7 +556,7 @@ class Dependency {
* package is in the process of being added to the graph), returns `null`.
*/
VersionConstraint get constraint {
- if (_refs.isEmpty()) return null;
+ if (_refs.isEmpty) return null;
return new VersionConstraint.intersect(
_refs.getValues().map((ref) => ref.constraint));
}
@@ -580,7 +580,7 @@ class Dependency {
/// [RootSource], that will be used; otherwise, it will be the source and
/// description that all dependencies agree upon.
PackageRef _canonicalRef() {
- if (_refs.isEmpty()) return null;
+ if (_refs.isEmpty) return null;
var refs = _refs.getValues();
for (var ref in refs) {
if (ref is RootSource) return ref;
@@ -624,7 +624,7 @@ class Dependency {
/// required to match. Returns null if there are no requirements on new
/// constraints.
PackageRef _requiredRef() {
- if (_refs.isEmpty()) return null;
+ if (_refs.isEmpty) return null;
var refs = _refs.getValues();
var first = refs[0];
if (refs.length == 1) {
« no previous file with comments | « utils/pub/pubspec.dart ('k') | utils/pub/yaml/yaml_map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698