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

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: 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
Index: pkg/intl/lib/intl.dart
diff --git a/pkg/intl/lib/intl.dart b/pkg/intl/lib/intl.dart
index ba517d3e320c1d3680766d3d863e959eec19ccf5..222d2ac443f6293b587774064e01078d79b73a90 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);
Alan Knight 2014/01/28 01:33:46 Missing a space after the =>
vicb 2014/01/28 07:52:45 fixed
/**
* Given [newLocale] return a locale that we have data for that is similar

Powered by Google App Engine
This is Rietveld 408576698