[glibmm: 1/2] Use {} for function arguments initialisation



commit e2ff5614574d48fe2862e86c8e60402a60e25f6a
Author: Tapasweni Pathak <tapaswenipathak gmail com>
Date:   Sun Jan 13 22:51:27 2019 +0530

    Use {} for function arguments initialisation
    
    Closes https://gitlab.gnome.org/GNOME/glibmm/issues/20.

 gio/giomm/socketsource.h       |  8 ++++----
 gio/src/application.hg         | 20 ++++++++++----------
 gio/src/dbusconnection.hg      | 42 +++++++++++++++++++++---------------------
 gio/src/dbusinterfacevtable.hg |  4 ++--
 gio/src/dbusownname.hg         |  6 +++---
 gio/src/dbusproxy.hg           | 36 ++++++++++++++++++------------------
 gio/src/dbussubtreevtable.hg   |  4 ++--
 gio/src/dbuswatchname.hg       |  8 ++++----
 gio/src/file.hg                | 16 ++++++++--------
 gio/src/menuitem.hg            |  2 +-
 gio/src/proxyaddress.hg        |  8 ++++----
 gio/src/socket.hg              | 10 +++++-----
 glib/src/binding.hg            |  4 ++--
 glib/src/iochannel.hg          |  4 ++--
 glib/src/optioncontext.hg      |  2 +-
 glib/src/optiongroup.hg        |  2 +-
 glib/src/spawn.hg              | 12 ++++++------
 glib/src/uriutils.hg           |  4 ++--
 glib/src/variant.hg            |  2 +-
 19 files changed, 97 insertions(+), 97 deletions(-)
---
diff --git a/gio/giomm/socketsource.h b/gio/giomm/socketsource.h
index 2b371c6b..a90edee1 100644
--- a/gio/giomm/socketsource.h
+++ b/gio/giomm/socketsource.h
@@ -75,7 +75,7 @@ public:
    */
   sigc::connection connect(const sigc::slot<bool(Glib::IOCondition)>& slot,
     const Glib::RefPtr<Socket>& socket, Glib::IOCondition condition,
-    const Glib::RefPtr<Cancellable>& cancellable = Glib::RefPtr<Cancellable>(),
+    const Glib::RefPtr<Cancellable>& cancellable = {},
     int priority = Glib::PRIORITY_DEFAULT);
 
 private:
@@ -93,7 +93,7 @@ private:
  * @ingroup NetworkIO
  */
 SignalSocket signal_socket(
-  const Glib::RefPtr<Glib::MainContext>& context = Glib::RefPtr<Glib::MainContext>());
+  const Glib::RefPtr<Glib::MainContext>& context = {});
 
 /** An event source that can monitor a Gio::Socket.
  * @see Gio::Socket::create_source().
@@ -108,7 +108,7 @@ public:
 
   static Glib::RefPtr<SocketSource> create(const Glib::RefPtr<Socket>& socket,
     Glib::IOCondition condition,
-    const Glib::RefPtr<Cancellable>& cancellable = Glib::RefPtr<Cancellable>());
+    const Glib::RefPtr<Cancellable>& cancellable = {});
 
 
 protected:
@@ -122,7 +122,7 @@ private:
   // This is just to avoid the need for Gio::Socket to create a RefPtr<> to itself.
   static Glib::RefPtr<SocketSource> create(GSocket* socket,
     Glib::IOCondition condition,
-    const Glib::RefPtr<Cancellable>& cancellable = Glib::RefPtr<Cancellable>());
+    const Glib::RefPtr<Cancellable>& cancellable = {});
 
   // This is just to avoid the need for Gio::Socket to create a RefPtr<> to itself.
   SocketSource(GSocket* socket, Glib::IOCondition condition,
diff --git a/gio/src/application.hg b/gio/src/application.hg
index b08bdb01..4fed2ec0 100644
--- a/gio/src/application.hg
+++ b/gio/src/application.hg
@@ -98,7 +98,7 @@ protected:
    * @param application_id The application ID.
    * @param flags The application flags.
    */
-  explicit Application(const Glib::ustring& application_id = Glib::ustring(), Flags flags = Flags::NONE);
+  explicit Application(const Glib::ustring& application_id = {}, Flags flags = Flags::NONE);
   _IGNORE(g_application_new)
 
 public:
@@ -139,7 +139,7 @@ public:
    * @param application_id The application ID.
    * @param flags The application flags.
    */
-  _WRAP_CREATE(const Glib::ustring& application_id = Glib::ustring(), Flags flags = Flags::NONE)
+  _WRAP_CREATE(const Glib::ustring& application_id = {}, Flags flags = Flags::NONE)
 
   _WRAP_METHOD(static bool id_is_valid(const Glib::ustring& application_id), g_application_id_is_valid)
 
@@ -233,8 +233,8 @@ public:
    *     Character encoding is chosen with @a arg_type.
    */
   void add_main_option_entry(OptionType arg_type, const Glib::ustring& long_name,
-    gchar short_name = '\0', const Glib::ustring& description = Glib::ustring(),
-    const Glib::ustring& arg_description = Glib::ustring(),
+    gchar short_name = '\0', const Glib::ustring& description = {},
+    const Glib::ustring& arg_description = {},
     Glib::OptionEntry::Flags flags = Glib::OptionEntry::Flags::NONE);
   _IGNORE(g_application_add_main_option_entries, g_application_add_main_option)
 
@@ -255,8 +255,8 @@ public:
    */
   void add_main_option_entry(const Glib::OptionGroup::SlotOptionArgString& slot,
     const Glib::ustring& long_name,
-    gchar short_name = '\0', const Glib::ustring& description = Glib::ustring(),
-    const Glib::ustring& arg_description = Glib::ustring(),
+    gchar short_name = '\0', const Glib::ustring& description = {},
+    const Glib::ustring& arg_description = {},
     Glib::OptionEntry::Flags flags = Glib::OptionEntry::Flags::NONE);
 
   /** Adds a main option entry to be handled by the Application.
@@ -276,8 +276,8 @@ public:
    */
   void add_main_option_entry_filename(const Glib::OptionGroup::SlotOptionArgFilename& slot,
     const Glib::ustring& long_name,
-    gchar short_name = '\0', const Glib::ustring& description = Glib::ustring(),
-    const Glib::ustring& arg_description = Glib::ustring(),
+    gchar short_name = '\0', const Glib::ustring& description = {},
+    const Glib::ustring& arg_description = {},
     Glib::OptionEntry::Flags flags = Glib::OptionEntry::Flags::NONE);
 
   // _WRAP_METHOD(void add_option_group(Glib::OptionGroup& group), g_application_add_option_group)
@@ -319,7 +319,7 @@ public:
    *
    * @newin{2,32}
    */
-  void open(const type_vec_files& files, const Glib::ustring& hint = Glib::ustring());
+  void open(const type_vec_files& files, const Glib::ustring& hint = {});
   _IGNORE(g_application_open)
 
   /* Opens the given file.
@@ -339,7 +339,7 @@ public:
    *
    * @newin{2,32}
    */
-  void open(const Glib::RefPtr<Gio::File>& file, const Glib::ustring& hint = Glib::ustring());
+  void open(const Glib::RefPtr<Gio::File>& file, const Glib::ustring& hint = {});
 
   _WRAP_METHOD(int run(int argc, char** argv), g_application_run)
 
diff --git a/gio/src/dbusconnection.hg b/gio/src/dbusconnection.hg
index f17992f1..d17d5a80 100644
--- a/gio/src/dbusconnection.hg
+++ b/gio/src/dbusconnection.hg
@@ -627,10 +627,10 @@ public:
     const Glib::VariantContainerBase&   parameters,
     const SlotAsyncReady&               slot,
     const Glib::RefPtr<Cancellable>&    cancellable,
-    const Glib::ustring&                bus_name = Glib::ustring(),
+    const Glib::ustring&                bus_name = {},
     int                                 timeout_msec = -1,
     CallFlags                           flags = Gio::DBus::CallFlags::NONE,
-    const Glib::VariantType&            reply_type = Glib::VariantType());
+    const Glib::VariantType&            reply_type = {});
   _IGNORE(g_dbus_connection_call)
 
   /// A non-cancellable version of call().
@@ -640,10 +640,10 @@ public:
     const Glib::ustring&                method_name,
     const Glib::VariantContainerBase&   parameters,
     const SlotAsyncReady&               slot,
-    const Glib::ustring&                bus_name = Glib::ustring(),
+    const Glib::ustring&                bus_name = {},
     int                                 timeout_msec = -1,
     CallFlags                           flags = Gio::DBus::CallFlags::NONE,
-    const Glib::VariantType&            reply_type = Glib::VariantType());
+    const Glib::VariantType&            reply_type = {});
 
   /** Finishes an operation started with call().
    * @param res A AsyncResult obtained from the SlotAsyncReady passed to
@@ -694,10 +694,10 @@ public:
     const Glib::ustring&                method_name,
     const Glib::VariantContainerBase&   parameters,
     const Glib::RefPtr<Cancellable>&    cancellable,
-    const Glib::ustring&                bus_name = Glib::ustring(),
+    const Glib::ustring&                bus_name = {},
     int                                 timeout_msec = -1,
     CallFlags                           flags = Gio::DBus::CallFlags::NONE,
-    const Glib::VariantType&            reply_type = Glib::VariantType());
+    const Glib::VariantType&            reply_type = {});
   _IGNORE(g_dbus_connection_call_sync)
 
   /// A non-cancellable version of call_sync().
@@ -706,10 +706,10 @@ public:
     const Glib::ustring&                interface_name,
     const Glib::ustring&                method_name,
     const Glib::VariantContainerBase&   parameters,
-    const Glib::ustring&                bus_name = Glib::ustring(),
+    const Glib::ustring&                bus_name = {},
     int                                 timeout_msec = -1,
     CallFlags                           flags = Gio::DBus::CallFlags::NONE,
-    const Glib::VariantType&            reply_type = Glib::VariantType());
+    const Glib::VariantType&            reply_type = {});
 
 #ifdef G_OS_UNIX
   /** Like call() but also takes a GUnixFDList object.
@@ -745,10 +745,10 @@ public:
     const SlotAsyncReady&               slot,
     const Glib::RefPtr<Cancellable>&    cancellable,
     const Glib::RefPtr<UnixFDList>&     fd_list,
-    const Glib::ustring&                bus_name = Glib::ustring(),
+    const Glib::ustring&                bus_name = {},
     int                                 timeout_msec = -1,
     CallFlags                           flags = Gio::DBus::CallFlags::NONE,
-    const Glib::VariantType&            reply_type = Glib::VariantType());
+    const Glib::VariantType&            reply_type = {});
   _IGNORE(g_dbus_connection_call_with_unix_fd_list)
 
   /** A non-cancellable version of call() (with a UnixFDList).
@@ -761,10 +761,10 @@ public:
     const Glib::VariantContainerBase&   parameters,
     const SlotAsyncReady&               slot,
     const Glib::RefPtr<UnixFDList>&     fd_list,
-    const Glib::ustring&                bus_name = Glib::ustring(),
+    const Glib::ustring&                bus_name = {},
     int                                 timeout_msec = -1,
     CallFlags                           flags = Gio::DBus::CallFlags::NONE,
-    const Glib::VariantType&            reply_type = Glib::VariantType());
+    const Glib::VariantType&            reply_type = {});
 #endif // G_OS_UNIX
 
   /** Finishes an operation started with call() (with a UnixFDList).
@@ -786,10 +786,10 @@ public:
       const Glib::RefPtr<Cancellable>&    cancellable{.?},
       const Glib::RefPtr<UnixFDList>&     fd_list{.},
       Glib::RefPtr<UnixFDList>&           out_fd_list{.>>},
-      const Glib::ustring&                bus_name{.NULL} = Glib::ustring(),
+      const Glib::ustring&                bus_name{.NULL} = {},
       int                                 timeout_msec{.} = -1,
       CallFlags                           flags{.} = Gio::DBus::CallFlags::NONE,
-      const Glib::VariantType&            reply_type{.} = Glib::VariantType()
+      const Glib::VariantType&            reply_type{.} = {}
     ),
     g_dbus_connection_call_with_unix_fd_list_sync, errthrow, ifdef G_OS_UNIX
   )
@@ -813,8 +813,8 @@ public:
     const Glib::ustring&                object_path,
     const Glib::ustring&                interface_name,
     const Glib::ustring&                signal_name,
-    const Glib::ustring&                destination_bus_name = Glib::ustring(),
-    const Glib::VariantContainerBase&   parameters = Glib::VariantContainerBase());
+    const Glib::ustring&                destination_bus_name = {},
+    const Glib::VariantContainerBase&   parameters = {});
   _IGNORE(g_dbus_connection_emit_signal)
 
   /** Subscribes to signals on the connection and invokes @a slot with a
@@ -850,11 +850,11 @@ public:
    */
   guint signal_subscribe(
     const SlotSignal& slot,
-    const Glib::ustring& sender = Glib::ustring(),
-    const Glib::ustring& interface_name = Glib::ustring(),
-    const Glib::ustring& member = Glib::ustring(),
-    const Glib::ustring& object_path = Glib::ustring(),
-    const Glib::ustring& arg0 = Glib::ustring(),
+    const Glib::ustring& sender = {},
+    const Glib::ustring& interface_name = {},
+    const Glib::ustring& member = {},
+    const Glib::ustring& object_path = {},
+    const Glib::ustring& arg0 = {},
     SignalFlags flags = Gio::DBus::SignalFlags::NONE);
   _IGNORE(g_dbus_connection_signal_subscribe)
 
diff --git a/gio/src/dbusinterfacevtable.hg b/gio/src/dbusinterfacevtable.hg
index 07715680..800f3fd8 100644
--- a/gio/src/dbusinterfacevtable.hg
+++ b/gio/src/dbusinterfacevtable.hg
@@ -119,8 +119,8 @@ public:
    */
   explicit InterfaceVTable(
    const SlotInterfaceMethodCall& slot_method_call,
-   const SlotInterfaceGetProperty& slot_get_property = SlotInterfaceGetProperty(),
-   const SlotInterfaceSetProperty& slot_set_property = SlotInterfaceSetProperty()
+   const SlotInterfaceGetProperty& slot_get_property = {},
+   const SlotInterfaceSetProperty& slot_set_property = {}
   );
 
   InterfaceVTable(const InterfaceVTable& other) = delete;
diff --git a/gio/src/dbusownname.hg b/gio/src/dbusownname.hg
index f0c660b1..7d0c99a6 100644
--- a/gio/src/dbusownname.hg
+++ b/gio/src/dbusownname.hg
@@ -110,9 +110,9 @@ using SlotNameLost = sigc::slot<void(const Glib::RefPtr<Gio::DBus::Connection>&,
 guint own_name(
   BusType bus_type,
   const Glib::ustring& name,
-  const SlotBusAcquired& bus_acquired_slot = SlotBusAcquired(),
-  const SlotNameAcquired& name_acquired_slot = SlotNameAcquired(),
-  const SlotNameLost& name_lost_slot = SlotNameLost(),
+  const SlotBusAcquired& bus_acquired_slot = {},
+  const SlotNameAcquired& name_acquired_slot = {},
+  const SlotNameLost& name_lost_slot = {},
   BusNameOwnerFlags flags = Gio::DBus::BusNameOwnerFlags::NONE
 );
 _IGNORE(g_bus_own_name)
diff --git a/gio/src/dbusproxy.hg b/gio/src/dbusproxy.hg
index 332e2296..74494434 100644
--- a/gio/src/dbusproxy.hg
+++ b/gio/src/dbusproxy.hg
@@ -80,7 +80,7 @@ protected:
     const Glib::ustring& interface_name,
     const SlotAsyncReady& slot,
     const Glib::RefPtr<Cancellable>& cancellable,
-    const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
+    const Glib::RefPtr<InterfaceInfo>& info = {},
     ProxyFlags flags = ProxyFlags::NONE);
 
   Proxy(const Glib::RefPtr<Connection>& connection,
@@ -88,7 +88,7 @@ protected:
     const Glib::ustring& object_path,
     const Glib::ustring& interface_name,
     const SlotAsyncReady& slot,
-    const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
+    const Glib::RefPtr<InterfaceInfo>& info = {},
     ProxyFlags flags = ProxyFlags::NONE);
 
   Proxy(const Glib::RefPtr<Connection>& connection,
@@ -96,14 +96,14 @@ protected:
     const Glib::ustring& object_path,
     const Glib::ustring& interface_name,
     const Glib::RefPtr<Cancellable>& cancellable,
-    const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
+    const Glib::RefPtr<InterfaceInfo>& info = {},
     ProxyFlags flags = ProxyFlags::NONE);
 
   Proxy(const Glib::RefPtr<Connection>& connection,
     const Glib::ustring& name,
     const Glib::ustring& object_path,
     const Glib::ustring& interface_name,
-    const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
+    const Glib::RefPtr<InterfaceInfo>& info = {},
     ProxyFlags flags = ProxyFlags::NONE);
 
   Proxy(BusType bus_type,
@@ -112,7 +112,7 @@ protected:
     const Glib::ustring& interface_name,
     const SlotAsyncReady& slot,
     const Glib::RefPtr<Cancellable>& cancellable,
-    const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
+    const Glib::RefPtr<InterfaceInfo>& info = {},
     ProxyFlags flags = ProxyFlags::NONE);
 
   Proxy(BusType bus_type,
@@ -120,7 +120,7 @@ protected:
     const Glib::ustring& object_path,
     const Glib::ustring& interface_name,
     const SlotAsyncReady& slot,
-    const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
+    const Glib::RefPtr<InterfaceInfo>& info = {},
     ProxyFlags flags = ProxyFlags::NONE);
 
   Proxy(BusType bus_type,
@@ -128,14 +128,14 @@ protected:
     const Glib::ustring& object_path,
     const Glib::ustring& interface_name,
     const Glib::RefPtr<Cancellable>& cancellable,
-    const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
+    const Glib::RefPtr<InterfaceInfo>& info = {},
     ProxyFlags flags = ProxyFlags::NONE);
 
   Proxy(BusType bus_type,
     const Glib::ustring& name,
     const Glib::ustring& object_path,
     const Glib::ustring& interface_name,
-    const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
+    const Glib::RefPtr<InterfaceInfo>& info = {},
     ProxyFlags flags = ProxyFlags::NONE);
 
 public:
@@ -147,7 +147,7 @@ public:
     const Glib::ustring& interface_name,
     const SlotAsyncReady& slot,
     const Glib::RefPtr<Cancellable>& cancellable,
-    const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
+    const Glib::RefPtr<InterfaceInfo>& info = {},
     ProxyFlags flags = ProxyFlags::NONE);
 
   /// Non-cancellable version of create().
@@ -156,7 +156,7 @@ public:
     const Glib::ustring& object_path,
     const Glib::ustring& interface_name,
     const SlotAsyncReady& slot,
-    const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
+    const Glib::RefPtr<InterfaceInfo>& info = {},
     ProxyFlags flags = ProxyFlags::NONE);
 
   _WRAP_METHOD_DOCS_ONLY(g_dbus_proxy_new_finish)
@@ -170,7 +170,7 @@ public:
     const Glib::ustring& object_path,
     const Glib::ustring& interface_name,
     const Glib::RefPtr<Cancellable>& cancellable,
-    const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
+    const Glib::RefPtr<InterfaceInfo>& info = {},
     ProxyFlags flags = ProxyFlags::NONE);
 
   /// Non-cancellable version of create_sync().
@@ -179,7 +179,7 @@ public:
     const Glib::ustring& name,
     const Glib::ustring& object_path,
     const Glib::ustring& interface_name,
-    const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
+    const Glib::RefPtr<InterfaceInfo>& info = {},
     ProxyFlags flags = ProxyFlags::NONE);
 
   _WRAP_METHOD_DOCS_ONLY(g_dbus_proxy_new_for_bus)
@@ -189,7 +189,7 @@ public:
     const Glib::ustring& interface_name,
     const SlotAsyncReady& slot,
     const Glib::RefPtr<Cancellable>& cancellable,
-    const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
+    const Glib::RefPtr<InterfaceInfo>& info = {},
     ProxyFlags flags = ProxyFlags::NONE);
 
   /// Non-cancellable version of create_for_bus().
@@ -198,7 +198,7 @@ public:
     const Glib::ustring& object_path,
     const Glib::ustring& interface_name,
     const SlotAsyncReady& slot,
-    const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
+    const Glib::RefPtr<InterfaceInfo>& info = {},
     ProxyFlags flags = ProxyFlags::NONE);
 
   _WRAP_METHOD_DOCS_ONLY(g_dbus_proxy_new_for_bus_finish)
@@ -212,7 +212,7 @@ public:
     const Glib::ustring& object_path,
     const Glib::ustring& interface_name,
     const Glib::RefPtr<Cancellable>& cancellable,
-    const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
+    const Glib::RefPtr<InterfaceInfo>& info = {},
     ProxyFlags flags = ProxyFlags::NONE);
 
   /// Non-cancellable version of create_for_bus_sync().
@@ -221,7 +221,7 @@ public:
     const Glib::ustring& name,
     const Glib::ustring& object_path,
     const Glib::ustring& interface_name,
-    const Glib::RefPtr<InterfaceInfo>& info = Glib::RefPtr<InterfaceInfo>(),
+    const Glib::RefPtr<InterfaceInfo>& info = {},
     ProxyFlags flags = ProxyFlags::NONE);
 
   _WRAP_METHOD(ProxyFlags get_flags() const, g_dbus_proxy_get_flags)
@@ -267,7 +267,7 @@ public:
       const Glib::ustring&               method_name{.},
       const SlotAsyncReady&              slot{callback?},
       const Glib::RefPtr<Cancellable>&   cancellable{.?},
-      const Glib::VariantContainerBase&  parameters{.} = Glib::VariantContainerBase(),
+      const Glib::VariantContainerBase&  parameters{.} = {},
       int                                timeout_msec{.} = -1,
       CallFlags                          flags{.} = Gio::DBus::CallFlags::NONE
     ),
@@ -288,7 +288,7 @@ public:
     Glib::VariantContainerBase call_sync(
       const Glib::ustring&               method_name{.},
       const Glib::RefPtr<Cancellable>&   cancellable{.?},
-      const Glib::VariantContainerBase&  parameters{.} = Glib::VariantContainerBase(),
+      const Glib::VariantContainerBase&  parameters{.} = {},
       int                                timeout_msec{.} = -1,
       CallFlags                          flags{.} = Gio::DBus::CallFlags::NONE
     ),
diff --git a/gio/src/dbussubtreevtable.hg b/gio/src/dbussubtreevtable.hg
index fcfbb996..477dffc7 100644
--- a/gio/src/dbussubtreevtable.hg
+++ b/gio/src/dbussubtreevtable.hg
@@ -128,8 +128,8 @@ public:
    */
   explicit SubtreeVTable(
    const SlotSubtreeEnumerate& slot_enumerate,
-   const SlotSubtreeIntrospect& slot_introspect = SlotSubtreeIntrospect(),
-   const SlotSubtreeDispatch& slot_dispatch = SlotSubtreeDispatch()
+   const SlotSubtreeIntrospect& slot_introspect = {},
+   const SlotSubtreeDispatch& slot_dispatch = {}
   );
 
   SubtreeVTable(const SubtreeVTable& other) = delete;
diff --git a/gio/src/dbuswatchname.hg b/gio/src/dbuswatchname.hg
index 555bcac2..1821c9ea 100644
--- a/gio/src/dbuswatchname.hg
+++ b/gio/src/dbuswatchname.hg
@@ -84,8 +84,8 @@ using SlotNameVanished = sigc::slot<void(const Glib::RefPtr<Gio::DBus::Connectio
 guint watch_name(
   BusType bus_type,
   const Glib::ustring& name,
-  const SlotNameAppeared& name_appeared_slot = SlotNameAppeared(),
-  const SlotNameVanished& name_vanished_slot = SlotNameVanished(),
+  const SlotNameAppeared& name_appeared_slot = {},
+  const SlotNameVanished& name_vanished_slot = {},
   BusNameWatcherFlags flags = Gio::DBus::BusNameWatcherFlags::NONE
 );
 _IGNORE(g_bus_watch_name)
@@ -107,8 +107,8 @@ _IGNORE(g_bus_watch_name)
 guint watch_name(
   const Glib::RefPtr<Connection>& connection,
   const Glib::ustring& name,
-  const SlotNameAppeared& name_appeared_slot = SlotNameAppeared(),
-  const SlotNameVanished& name_vanished_slot = SlotNameVanished(),
+  const SlotNameAppeared& name_appeared_slot = {},
+  const SlotNameVanished& name_vanished_slot = {},
   BusNameWatcherFlags flags = Gio::DBus::BusNameWatcherFlags::NONE
 );
 _IGNORE(g_bus_watch_name_on_connection)
diff --git a/gio/src/file.hg b/gio/src/file.hg
index 9e3a9f57..1d321507 100644
--- a/gio/src/file.hg
+++ b/gio/src/file.hg
@@ -408,7 +408,7 @@ public:
    * @param flags A set of CreateFlags.
    * @return A FileOutputStream.
    */
-  Glib::RefPtr<FileOutputStream> replace(const Glib::RefPtr<Cancellable>& cancellable, const std::string& 
etag = std::string(), bool make_backup = false, CreateFlags flags = CreateFlags::NONE);
+  Glib::RefPtr<FileOutputStream> replace(const Glib::RefPtr<Cancellable>& cancellable, const std::string& 
etag = {}, bool make_backup = false, CreateFlags flags = CreateFlags::NONE);
 
 
   /** Returns an output stream for overwriting the file, possibly creating a backup copy of the file first.
@@ -441,7 +441,7 @@ public:
    * @param flags A set of CreateFlags.
    * @return A FileOutputStream.
    */
-  Glib::RefPtr<FileOutputStream> replace(const std::string& etag = std::string(), bool make_backup = false, 
CreateFlags flags = CreateFlags::NONE);
+  Glib::RefPtr<FileOutputStream> replace(const std::string& etag = {}, bool make_backup = false, CreateFlags 
flags = CreateFlags::NONE);
 
   _IGNORE(g_file_replace)
 
@@ -551,7 +551,7 @@ public:
    * @param flags A set of CreateFlags.
    * @param io_priority The I/O priority of the request.
    */
-  void replace_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const 
std::string& etag = std::string(), bool make_backup = false, CreateFlags flags = CreateFlags::NONE, int 
io_priority = Glib::PRIORITY_DEFAULT);
+  void replace_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const 
std::string& etag = {}, bool make_backup = false, CreateFlags flags = CreateFlags::NONE, int io_priority = 
Glib::PRIORITY_DEFAULT);
 
   /** Asyncronously overwrites the file, replacing the contents, possibly creating a backup copy of the file 
first.
    * For more details, see replace() which is the synchronous version of this call.
@@ -563,7 +563,7 @@ public:
    * @param flags A set of CreateFlags.
    * @param io_priority The I/O priority of the request.
    */
-  void replace_async(const SlotAsyncReady& slot, const std::string& etag = std::string(), bool make_backup = 
false, CreateFlags flags = CreateFlags::NONE, int io_priority = Glib::PRIORITY_DEFAULT);
+  void replace_async(const SlotAsyncReady& slot, const std::string& etag = {}, bool make_backup = false, 
CreateFlags flags = CreateFlags::NONE, int io_priority = Glib::PRIORITY_DEFAULT);
   _IGNORE(g_file_replace_async)
 
   _WRAP_METHOD(Glib::RefPtr<FileOutputStream> replace_finish(const Glib::RefPtr<AsyncResult>& res),
@@ -638,7 +638,7 @@ public:
    *
    * @newin{2,24}
    */
-  Glib::RefPtr<FileIOStream> replace_readwrite(const Glib::RefPtr<Cancellable>& cancellable, const 
std::string& etag = std::string(), bool make_backup = false, CreateFlags flags = CreateFlags::NONE);
+  Glib::RefPtr<FileIOStream> replace_readwrite(const Glib::RefPtr<Cancellable>& cancellable, const 
std::string& etag = {}, bool make_backup = false, CreateFlags flags = CreateFlags::NONE);
 
 
   /** Returns an output stream for overwriting the file in readwrite mode, possibly creating a backup copy 
of the file first.
@@ -658,7 +658,7 @@ public:
    *
    * @newin{2,24}
    */
-  Glib::RefPtr<FileIOStream> replace_readwrite(const std::string& etag = std::string(), bool make_backup = 
false, CreateFlags flags = CreateFlags::NONE);
+  Glib::RefPtr<FileIOStream> replace_readwrite(const std::string& etag = {}, bool make_backup = false, 
CreateFlags flags = CreateFlags::NONE);
 
   _IGNORE(g_file_replace_readwrite)
 
@@ -678,7 +678,7 @@ public:
    *
    * @newin{2,24}
    */
-  void replace_readwrite_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, 
const std::string& etag = std::string(), bool make_backup = false, CreateFlags flags = CreateFlags::NONE, int 
io_priority = Glib::PRIORITY_DEFAULT);
+  void replace_readwrite_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, 
const std::string& etag = {}, bool make_backup = false, CreateFlags flags = CreateFlags::NONE, int 
io_priority = Glib::PRIORITY_DEFAULT);
 
   /** Asyncronously overwrites the file in read-write mode, replacing the contents, possibly creating a 
backup copy of the file first.
    *
@@ -693,7 +693,7 @@ public:
    *
    * @newin{2,24}
    */
-  void replace_readwrite_async(const SlotAsyncReady& slot, const std::string& etag = std::string(), bool 
make_backup = false, CreateFlags flags = CreateFlags::NONE, int io_priority = Glib::PRIORITY_DEFAULT);
+  void replace_readwrite_async(const SlotAsyncReady& slot, const std::string& etag = {}, bool make_backup = 
false, CreateFlags flags = CreateFlags::NONE, int io_priority = Glib::PRIORITY_DEFAULT);
   _IGNORE(g_file_replace_readwrite_async)
 
   _WRAP_METHOD(Glib::RefPtr<FileIOStream> replace_readwrite_finish(const Glib::RefPtr<AsyncResult>& res),
diff --git a/gio/src/menuitem.hg b/gio/src/menuitem.hg
index 0fff7568..02d1aedc 100644
--- a/gio/src/menuitem.hg
+++ b/gio/src/menuitem.hg
@@ -47,7 +47,7 @@ protected:
    * @param label The section label.
    * @param detailed_action: The detailed action string.
    */
-  explicit MenuItem(const Glib::ustring& label = Glib::ustring(), const Glib::ustring& detailed_action = 
Glib::ustring());
+  explicit MenuItem(const Glib::ustring& label = {}, const Glib::ustring& detailed_action = {});
   _IGNORE(g_menu_item_new)
 
   /** Creates a new MenuItem representing a submenu.
diff --git a/gio/src/proxyaddress.hg b/gio/src/proxyaddress.hg
index 44a98352..3221b4b9 100644
--- a/gio/src/proxyaddress.hg
+++ b/gio/src/proxyaddress.hg
@@ -39,8 +39,8 @@ protected:
     const Glib::ustring& protocol,
     const Glib::ustring& destination_hostname,
     guint16 destination_port,
-    const Glib::ustring& username = Glib::ustring(),
-    const Glib::ustring& password = Glib::ustring()), g_proxy_address_new)
+    const Glib::ustring& username = {},
+    const Glib::ustring& password = {}), g_proxy_address_new)
 
 public:
   _WRAP_CREATE(const Glib::RefPtr<InetAddress>& address,
@@ -48,8 +48,8 @@ public:
     const Glib::ustring& protocol,
     const Glib::ustring& destination_hostname,
     guint16 destination_port,
-    const Glib::ustring& username = Glib::ustring(),
-    const Glib::ustring& password = Glib::ustring())
+    const Glib::ustring& username = {},
+    const Glib::ustring& password = {})
 
   _WRAP_METHOD(Glib::ustring get_protocol() const, g_proxy_address_get_protocol)
   _WRAP_METHOD(Glib::ustring get_destination_protocol() const, g_proxy_address_get_destination_protocol)
diff --git a/gio/src/socket.hg b/gio/src/socket.hg
index 233e20ad..1069eb2b 100644
--- a/gio/src/socket.hg
+++ b/gio/src/socket.hg
@@ -106,7 +106,7 @@ public:
    */
   static Glib::RefPtr<Socket>
   create(SocketFamily family, Type type, Protocol protocol,
-         const Glib::RefPtr<Cancellable>& cancellable = Glib::RefPtr<Cancellable>());
+         const Glib::RefPtr<Cancellable>& cancellable = {});
 
   // gmmproc thinks that this function should be wrapped in this class because
   // its only parameter is a GSocket.  In fact, it is wrapped in the
@@ -118,7 +118,7 @@ public:
    * @throw Glib::Error
    */
   static Glib::RefPtr<Socket> create_from_fd(int fd, const Glib::RefPtr<Cancellable>&
-                                             cancellable = Glib::RefPtr<Cancellable>());
+                                             cancellable = {});
 
   /** When a socket is created it is attached to an address family, but it doesn't
    * have an address in this family. Socket::bind() assigns the address (sometimes
@@ -255,7 +255,7 @@ public:
    * @param cancellable A Cancellable. The default value means the source is not cancellable.
    * @return A newly allocated SocketSource.
    */
-  Glib::RefPtr<SocketSource> create_source(Glib::IOCondition condition, const Glib::RefPtr<Cancellable>& 
cancellable = Glib::RefPtr<Cancellable>());
+  Glib::RefPtr<SocketSource> create_source(Glib::IOCondition condition, const Glib::RefPtr<Cancellable>& 
cancellable = {});
   _IGNORE(g_socket_create_source)
 
   _WRAP_METHOD(void shutdown(bool shutdown_read, bool shutdown_write), g_socket_shutdown, errthrow)
@@ -290,10 +290,10 @@ public:
   _WRAP_METHOD(void set_timeout(guint timeout), g_socket_set_timeout)
 
   _WRAP_METHOD_DOCS_ONLY(g_socket_receive_with_blocking)
-  gssize receive_with_blocking(gchar* buffer, gsize size, bool blocking, const Glib::RefPtr<Cancellable>& 
cancellable = Glib::RefPtr<Cancellable>());
+  gssize receive_with_blocking(gchar* buffer, gsize size, bool blocking, const Glib::RefPtr<Cancellable>& 
cancellable = {});
 
   _WRAP_METHOD_DOCS_ONLY(g_socket_send_with_blocking)
-  gssize send_with_blocking(gchar* buffer, gsize size, bool blocking, const Glib::RefPtr<Cancellable>& 
cancellable = Glib::RefPtr<Cancellable>());
+  gssize send_with_blocking(gchar* buffer, gsize size, bool blocking, const Glib::RefPtr<Cancellable>& 
cancellable = {});
 
   _WRAP_METHOD(bool get_option(int level, int optname, int& value) const, g_socket_get_option, errthrow)
   _WRAP_METHOD(bool set_option(int level, int optname, int value), g_socket_set_option, errthrow)
diff --git a/glib/src/binding.hg b/glib/src/binding.hg
index c99c8ca1..6d1f8378 100644
--- a/glib/src/binding.hg
+++ b/glib/src/binding.hg
@@ -142,8 +142,8 @@ public:
     const PropertyProxy_Base& source_property,
     const PropertyProxy_Base& target_property,
     Flags flags = Flags::DEFAULT,
-    const SlotTransform& transform_to = SlotTransform(),
-    const SlotTransform& transform_from = SlotTransform());
+    const SlotTransform& transform_to = {},
+    const SlotTransform& transform_from = {});
 
   _IGNORE(g_object_bind_property, g_object_bind_property_full, g_object_bind_property_with_closures)
 
diff --git a/glib/src/iochannel.hg b/glib/src/iochannel.hg
index 09db151a..8c761d55 100644
--- a/glib/src/iochannel.hg
+++ b/glib/src/iochannel.hg
@@ -388,7 +388,7 @@ public:
    * @return Glib::IOStatus::NORMAL if the encoding was successfully set.
    * @throw Glib::IOChannelError
    */
-  IOStatus set_encoding(const std::string& encoding = std::string());
+  IOStatus set_encoding(const std::string& encoding = {});
   _IGNORE(g_io_channel_set_encoding)
 
   /** Get the encoding of the I/O channel.
@@ -397,7 +397,7 @@ public:
   std::string get_encoding() const;
   _IGNORE(g_io_channel_get_encoding)
 
-  void set_line_term(const std::string& term = std::string());
+  void set_line_term(const std::string& term = {});
   _IGNORE(g_io_channel_set_line_term)
 
   std::string get_line_term() const;
diff --git a/glib/src/optioncontext.hg b/glib/src/optioncontext.hg
index 9672650f..ad696ade 100644
--- a/glib/src/optioncontext.hg
+++ b/glib/src/optioncontext.hg
@@ -92,7 +92,7 @@ public:
   /** Creates a new option context.
    * @param parameter_string A string which is displayed in the first line of --help output, after 
programname [OPTION...]
    */
-  explicit OptionContext(const Glib::ustring& parameter_string = Glib::ustring());
+  explicit OptionContext(const Glib::ustring& parameter_string = {});
 
   //Note that, unlike Glib::wrap(), this would create a second C++ instance for the same C instance,
   //so it should be used carefully. For instance you could not access data in a derived class via this 
second instance.
diff --git a/glib/src/optiongroup.hg b/glib/src/optiongroup.hg
index 6ef64cdd..bf690896 100644
--- a/glib/src/optiongroup.hg
+++ b/glib/src/optiongroup.hg
@@ -69,7 +69,7 @@ public:
    */
   using SlotOptionArgFilename = sigc::slot<bool(const Glib::ustring&, const std::string&, bool)>;
 
-  OptionGroup(const Glib::ustring& name, const Glib::ustring& description, const Glib::ustring& 
help_description = Glib::ustring());
+  OptionGroup(const Glib::ustring& name, const Glib::ustring& description, const Glib::ustring& 
help_description = {});
 
   /** This always takes ownership of the underlying GOptionGroup,
    * so it is only useful with C functions that return newly-allocated GOptionGroups.
diff --git a/glib/src/spawn.hg b/glib/src/spawn.hg
index b6a05d6e..b3c171e9 100644
--- a/glib/src/spawn.hg
+++ b/glib/src/spawn.hg
@@ -195,7 +195,7 @@ void spawn_async_with_pipes(const std::string& working_directory,
                             const std::vector<std::string>& argv,
                             const std::vector<std::string>& envp,
                             SpawnFlags flags = SpawnFlags::DEFAULT,
-                            const SlotSpawnChildSetup& child_setup = SlotSpawnChildSetup(),
+                            const SlotSpawnChildSetup& child_setup = {},
                             Pid* child_pid = nullptr,
                             int* standard_input = nullptr,
                             int* standard_output = nullptr,
@@ -221,7 +221,7 @@ void spawn_async_with_pipes(const std::string& working_directory,
 void spawn_async_with_pipes(const std::string& working_directory,
                             const std::vector<std::string>& argv,
                             SpawnFlags flags = SpawnFlags::DEFAULT,
-                            const SlotSpawnChildSetup& child_setup = SlotSpawnChildSetup(),
+                            const SlotSpawnChildSetup& child_setup = {},
                             Pid* child_pid = nullptr,
                             int* standard_input = nullptr,
                             int* standard_output = nullptr,
@@ -252,7 +252,7 @@ void spawn_async(const std::string& working_directory,
                  const std::vector<std::string>& argv,
                  const std::vector<std::string>& envp,
                  SpawnFlags flags = SpawnFlags::DEFAULT,
-                 const SlotSpawnChildSetup& child_setup = SlotSpawnChildSetup(),
+                 const SlotSpawnChildSetup& child_setup = {},
                  Pid* child_pid = nullptr);
 
 /** Like the main spawn_async() method, but inheriting the parent's environment.
@@ -271,7 +271,7 @@ void spawn_async(const std::string& working_directory,
 void spawn_async(const std::string& working_directory,
                  const std::vector<std::string>& argv,
                  SpawnFlags flags = SpawnFlags::DEFAULT,
-                 const SlotSpawnChildSetup& child_setup = SlotSpawnChildSetup(),
+                 const SlotSpawnChildSetup& child_setup = {},
                  Pid* child_pid = nullptr);
 
 /** Executes a child synchronously (waits for the child to exit before returning).
@@ -310,7 +310,7 @@ void spawn_sync(const std::string& working_directory,
                 const std::vector<std::string>& argv,
                 const std::vector<std::string>& envp,
                 SpawnFlags flags = SpawnFlags::DEFAULT,
-                const SlotSpawnChildSetup& child_setup = SlotSpawnChildSetup(),
+                const SlotSpawnChildSetup& child_setup = {},
                 std::string* standard_output = nullptr,
                 std::string* standard_error = nullptr,
                 int* exit_status = nullptr);
@@ -334,7 +334,7 @@ void spawn_sync(const std::string& working_directory,
 void spawn_sync(const std::string& working_directory,
                 const std::vector<std::string>& argv,
                 SpawnFlags flags = SpawnFlags::DEFAULT,
-                const SlotSpawnChildSetup& child_setup = SlotSpawnChildSetup(),
+                const SlotSpawnChildSetup& child_setup = {},
                 std::string* standard_output = nullptr,
                 std::string* standard_error = nullptr,
                 int* exit_status = nullptr);
diff --git a/glib/src/uriutils.hg b/glib/src/uriutils.hg
index 05358a46..167068b9 100644
--- a/glib/src/uriutils.hg
+++ b/glib/src/uriutils.hg
@@ -42,7 +42,7 @@ namespace Glib
  * @ingroup UriUtils
  * @newin{2,16}
  */
-std::string uri_unescape_string(const std::string& escaped_string, const std::string& illegal_characters = 
std::string());
+std::string uri_unescape_string(const std::string& escaped_string, const std::string& illegal_characters = 
{});
 
 //TODO: Use iterator?
 //char *   g_uri_unescape_segment      (const char *escaped_string,
@@ -80,6 +80,6 @@ std::string uri_parse_scheme(const std::string& uri);
  * @ingroup UriUtils
  * @newin{2,16}
  */
-std::string uri_escape_string(const std::string& unescaped, const std::string& reserved_chars_allowed = 
std::string(), bool allow_utf8 = true);
+std::string uri_escape_string(const std::string& unescaped, const std::string& reserved_chars_allowed = {}, 
bool allow_utf8 = true);
 
 } // namespace Glib
diff --git a/glib/src/variant.hg b/glib/src/variant.hg
index 4788b818..41e96745 100644
--- a/glib/src/variant.hg
+++ b/glib/src/variant.hg
@@ -368,7 +368,7 @@ public:
 
   _WRAP_METHOD_DOCS_ONLY(g_variant_new_maybe)
   static VariantContainerBase create_maybe(const VariantType& child_type,
-    const VariantBase& child = VariantBase());
+    const VariantBase& child = {});
 
   _WRAP_METHOD(gsize get_n_children() const, g_variant_n_children)
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]