gio: use g_variant_builder_init_static()

All uses of g_variant_builder_init() in gio are safe to translate to the
new g_variant_builder_init_static() alternative as the type will outlive
the call to g_variant_builder_end() (or is already static in nature).
This commit is contained in:
Christian Hergert
2024-09-25 11:09:07 -07:00
committed by Philip Withnall
parent bfac590364
commit 0f95b18a7b
28 changed files with 85 additions and 85 deletions

View File

@@ -235,7 +235,7 @@ set_debug_enabled (GDebugControllerDBus *self,
/* Notify internally and externally of the property change. */
g_object_notify (G_OBJECT (self), "debug-enabled");
g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
g_variant_builder_add (&builder, "{sv}", "DebugEnabled", g_variant_new_boolean (priv->debug_enabled));
g_dbus_connection_emit_signal (priv->connection,