[libgweather/ebassi/parallel-tests: 3/15] Get the GWeatherDb when getting a timezone
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgweather/ebassi/parallel-tests: 3/15] Get the GWeatherDb when getting a timezone
- Date: Fri, 19 Nov 2021 18:25:45 +0000 (UTC)
commit cac4e5ac3ce4d344f0625a2c206315cc4c96336b
Author: Emmanuele Bassi <ebassi gnome org>
Date: Fri Nov 19 14:46:20 2021 +0000
Get the GWeatherDb when getting a timezone
We are creating a world location just to extract the database pointer.
libgweather/gweather-timezone.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
---
diff --git a/libgweather/gweather-timezone.c b/libgweather/gweather-timezone.c
index cd8f4054..a8242eff 100644
--- a/libgweather/gweather-timezone.c
+++ b/libgweather/gweather-timezone.c
@@ -185,16 +185,12 @@ _gweather_timezone_ref_for_idx (GWeatherDb *db,
GWeatherTimezone *
gweather_timezone_get_by_tzid (const char *tzid)
{
- g_autoptr (GWeatherLocation) world = NULL;
GWeatherDb *db;
gsize idx;
g_return_val_if_fail (tzid != NULL, NULL);
- /* TODO: Get the DB directly */
- world = gweather_location_get_world ();
- db = world->db;
-
+ db = gweather_get_db ();
if (!db_world_timezones_lookup (db->timezones_ref, tzid, &idx, NULL))
return NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]