aboutsummaryrefslogtreecommitdiff
path: root/data/main.vala
diff options
context:
space:
mode:
Diffstat (limited to 'data/main.vala')
-rw-r--r--data/main.vala17
1 files changed, 8 insertions, 9 deletions
diff --git a/data/main.vala b/data/main.vala
index 6457c61f..8077f093 100644
--- a/data/main.vala
+++ b/data/main.vala
@@ -91,15 +91,14 @@ int main (string[] args) {
info.get_layout_info (name, null, out short_name, null, null);
- if (short_name != null) {
- var abbreviation = get_abbreviation ((!) short_name);
-
- if (abbreviation.get_char () != '\0') {
- if (!occurrences.has_key (abbreviation)) {
- occurrences[abbreviation] = 1;
- } else {
- occurrences[abbreviation] = occurrences[abbreviation] + 1;
- }
+ var abbreviation = abbreviate (short_name);
+ var has_abbreviation = abbreviation != null && ((!) abbreviation).get_char () != '\0';
+
+ if (has_abbreviation) {
+ if (!occurrences.has_key ((!) abbreviation)) {
+ occurrences[(!) abbreviation] = 1;
+ } else {
+ occurrences[(!) abbreviation] = occurrences[(!) abbreviation] + 1;
}
}
});