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

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

Issue 140843002: [Intl] Cleanup some code (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: integrate feedback Created 6 years, 11 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 | « pkg/intl/lib/generate_localized.dart ('k') | pkg/intl/lib/number_format.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/intl/lib/intl.dart
diff --git a/pkg/intl/lib/intl.dart b/pkg/intl/lib/intl.dart
index ba517d3e320c1d3680766d3d863e959eec19ccf5..f5ae96f396cbf9af289f493b0755aed7a26e8d23 100644
--- a/pkg/intl/lib/intl.dart
+++ b/pkg/intl/lib/intl.dart
@@ -121,11 +121,7 @@ class Intl {
* preferences).
*/
Intl([String aLocale]) {
- if (aLocale != null) {
- _locale = aLocale;
- } else {
- _locale = getCurrentLocale();
- }
+ _locale = aLocale != null ? aLocale : getCurrentLocale();
}
/**
@@ -177,9 +173,7 @@ class Intl {
* Return true if the locale exists, or if it is null. The null case
* is interpreted to mean that we use the default locale.
*/
- static bool _localeExists(localeName) {
- return DateFormat.localeExists(localeName);
- }
+ static bool _localeExists(localeName) => DateFormat.localeExists(localeName);
/**
* Given [newLocale] return a locale that we have data for that is similar
« no previous file with comments | « pkg/intl/lib/generate_localized.dart ('k') | pkg/intl/lib/number_format.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698