diff options
author | Bastien Nocera <hadess@hadess.net> | 2019-07-04 12:19:48 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2019-07-04 12:29:42 +0200 |
commit | d9c4c5b74a540e13692e6e65f9ebbd1c47297346 (patch) | |
tree | 74281f44f682bcb60fcc6b46b60d9240c4e03cf9 | |
parent | 99141f37727ae4f893f37656f22732305d42df37 (diff) | |
download | libgweather-d9c4c5b74a540e13692e6e65f9ebbd1c47297346.tar.gz |
tests: Simplify weather station duplicates testing
And bump the required glib to 2015's 2.44 version.
-rw-r--r-- | libgweather/test_libgweather.c | 8 | ||||
-rw-r--r-- | meson.build | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/libgweather/test_libgweather.c b/libgweather/test_libgweather.c index a92bffa..13e5036 100644 --- a/libgweather/test_libgweather.c +++ b/libgweather/test_libgweather.c @@ -331,8 +331,12 @@ parse_metar_stations (const char *contents) } if (g_hash_table_lookup (stations_ht, station)) { - if (g_str_equal (station, "VOGO") || - g_str_equal (station, "KHQG")) { + const char * const known_duplicates[] = { + "VOGO", + "KHQG", + NULL + }; + if (g_strv_contains (known_duplicates, station)) { g_free (station); continue; } diff --git a/meson.build b/meson.build index 54a5063..c275085 100644 --- a/meson.build +++ b/meson.build @@ -39,7 +39,7 @@ libexecdir = join_paths(prefix, get_option('libexecdir')) sysconfdir = join_paths(prefix, get_option('sysconfdir')) pkgdatadir = join_paths(datadir, 'libgweather') -glib_req_version = '>= 2.35.1' +glib_req_version = '>= 2.44.0' gtk_req_version = '>= 3.13.5' libsoup_req_version = '>= 2.44.0' libxml_req_version = '>= 2.6.0' |