libmm-glib,location-gps-nmea: avoid using deprecated build_full() method

mm-location-gps-nmea.c: In function ‘mm_location_gps_nmea_get_string_variant’:
  mm-location-gps-nmea.c:245:5: warning: ‘mm_location_gps_nmea_build_full’ is deprecated: Use 'mm_location_gps_nmea_get_traces' instead [-Wdeprecated-declarations]
    245 |     built = mm_location_gps_nmea_build_full (self);
        |     ^~~~~
This commit is contained in:
Aleksander Morgado
2020-01-31 14:30:23 +01:00
parent 02eafb5821
commit 11f04851ce

View File

@@ -237,16 +237,14 @@ mm_location_gps_nmea_build_full (MMLocationGpsNmea *self)
GVariant * GVariant *
mm_location_gps_nmea_get_string_variant (MMLocationGpsNmea *self) mm_location_gps_nmea_get_string_variant (MMLocationGpsNmea *self)
{ {
GVariant *variant = NULL; g_autofree gchar *built = NULL;
gchar *built; g_auto (GStrv) traces = NULL;
g_return_val_if_fail (MM_IS_LOCATION_GPS_NMEA (self), NULL); g_return_val_if_fail (MM_IS_LOCATION_GPS_NMEA (self), NULL);
built = mm_location_gps_nmea_build_full (self); traces = mm_location_gps_nmea_get_traces (self);
variant = g_variant_new_string (built); built = g_strjoinv ("\r\n", traces);
g_free (built); return g_variant_new_string (built);
return variant;
} }
/*****************************************************************************/ /*****************************************************************************/