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

Unified Diff: pkg/intl/lib/src/lazy_locale_data.dart

Issue 11038007: Minor cleanups to take advantage of lazy initialization (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/intl/lib/src/lazy_locale_data.dart
===================================================================
--- pkg/intl/lib/src/lazy_locale_data.dart (revision 13132)
+++ pkg/intl/lib/src/lazy_locale_data.dart (working copy)
@@ -42,7 +42,7 @@
/**
* The set of available locales.
*/
- Set _availableLocaleSet;
+ Set availableLocaleSet;
/**
* The constructor. The [uriString] specifies where the data comes
@@ -54,16 +54,9 @@
LazyLocaleData(this._reader, this._creationFunction, List keys) {
map = new Map();
availableLocales = keys;
+ availableLocaleSet = new Set.from(availableLocales);
}
- /** The set of available locales. */
- get availableLocaleSet {
- if (_availableLocaleSet == null) {
- _availableLocaleSet = new Set.from(availableLocales);
- }
- return _availableLocaleSet;
- }
-
/**
* Tests if we have data for the locale available. Note that this returns
* true even if the data is known to be available remotely but not yet loaded.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698