Skip to content

Commit b8e055c

Browse files
kyle-sylvestreslouken
authored andcommitted
use SDL style - else on same line as closing brace
1 parent 8e22194 commit b8e055c

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

android-project/app/src/main/java/org/libsdl/app/SDLActivity.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2129,8 +2129,7 @@ public static String getPreferredLocales() {
21292129
if (i != 0) result += ",";
21302130
result += formatLocale(locales.get(i));
21312131
}
2132-
}
2133-
else if (mCurrentLocale != null) {
2132+
} else if (mCurrentLocale != null) {
21342133
result = formatLocale(mCurrentLocale);
21352134
}
21362135
return result;
@@ -2142,19 +2141,16 @@ public static String formatLocale(Locale locale) {
21422141
if (locale.getLanguage() == "in") {
21432142
// Indonesian is "id" according to ISO 639.2, but on Android is "in" because of Java backwards compatibility
21442143
lang = "id";
2145-
}
2146-
else if (locale.getLanguage() == "") {
2144+
} else if (locale.getLanguage() == "") {
21472145
// Make sure language is never empty
21482146
lang = "und";
2149-
}
2150-
else {
2147+
} else {
21512148
lang = locale.getLanguage();
21522149
}
21532150

21542151
if (locale.getCountry() == "") {
21552152
result = lang;
2156-
}
2157-
else {
2153+
} else {
21582154
result = lang + "_" + locale.getCountry();
21592155
}
21602156
return result;

0 commit comments

Comments
 (0)