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 *
mm_location_gps_nmea_get_string_variant (MMLocationGpsNmea *self)
{
GVariant *variant = NULL;
gchar *built;
g_autofree gchar *built = NULL;
g_auto (GStrv) traces = NULL;
g_return_val_if_fail (MM_IS_LOCATION_GPS_NMEA (self), NULL);
built = mm_location_gps_nmea_build_full (self);
variant = g_variant_new_string (built);
g_free (built);
return variant;
traces = mm_location_gps_nmea_get_traces (self);
built = g_strjoinv ("\r\n", traces);
return g_variant_new_string (built);
}
/*****************************************************************************/