diff options
author | Murray Cumming <murrayc@murrayc.com> | 2015-07-15 12:45:22 +0200 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2015-07-15 12:45:22 +0200 |
commit | 40f91e93e079a59d6e39bf0f7f2012357d3ee763 (patch) | |
tree | 8fcaf53512a26f6440362b87d3139d634eb76dd6 /gio | |
parent | 254f5b93e08e45cd32ccdbb0f4a31c433ece9d08 (diff) | |
download | glibmm-40f91e93e079a59d6e39bf0f7f2012357d3ee763.tar.gz |
C++11: Some use of the auto keyword.
Diffstat (limited to 'gio')
43 files changed, 226 insertions, 226 deletions
diff --git a/gio/src/action.hg b/gio/src/action.hg index eca98122..1b10876e 100644 --- a/gio/src/action.hg +++ b/gio/src/action.hg @@ -243,8 +243,8 @@ void Action::get_state(T_Value& value) const g_return_if_fail( g_variant_type_equal(g_action_get_state_type(const_cast<GAction*>(gobj())), type_glib_variant::variant_type().gobj())); - const Glib::VariantBase variantBase = get_state_variant(); - const type_glib_variant variantDerived = variantBase.cast_dynamic<type_glib_variant>(variantBase); + const auto variantBase = get_state_variant(); + const auto variantDerived = variantBase.cast_dynamic<type_glib_variant>(variantBase); value = variantDerived.get(); } @@ -255,13 +255,13 @@ void Action::get_state_hint(T_Value& value) const typedef Glib::Variant<T_Value> type_glib_variant; - const Glib::VariantBase variantBase = get_state_hint_variant(); + const auto variantBase = get_state_hint_variant(); // We can't check the type (a range) that will be returned before getting the range hint. g_return_if_fail( variantBase.is_of_type(type_glib_variant::variant_type()) ); - const type_glib_variant variantDerived = variantBase.cast_dynamic<type_glib_variant>(variantBase); + const auto variantDerived = variantBase.cast_dynamic<type_glib_variant>(variantBase); value = variantDerived.get(); } diff --git a/gio/src/actiongroup.hg b/gio/src/actiongroup.hg index 71385be6..a1d5d333 100644 --- a/gio/src/actiongroup.hg +++ b/gio/src/actiongroup.hg @@ -169,10 +169,10 @@ void ActionGroup::get_action_state(const Glib::ustring& action_name, T_Value& va g_return_if_fail( g_variant_type_equal(g_action_group_get_action_state_type(const_cast<GActionGroup*>(gobj()), action_name.c_str()), type_glib_variant::variant_type().gobj())); - const Glib::VariantBase variantBase = get_action_state_variant(action_name); + const auto variantBase = get_action_state_variant(action_name); //TODO: Add a bool return instead of letting a std::bad_cast from the cast_dynamic() be thrown up to the caller? - const type_glib_variant variantDerived = variantBase.cast_dynamic<type_glib_variant>(variantBase); + const auto variantDerived = variantBase.cast_dynamic<type_glib_variant>(variantBase); value = variantDerived.get(); } @@ -183,13 +183,13 @@ void ActionGroup::get_action_state_hint(const Glib::ustring& action_name, T_Valu typedef Glib::Variant<T_Value> type_glib_variant; - const Glib::VariantBase variantBase = get_action_state_hint_variant(action_name); + const auto variantBase = get_action_state_hint_variant(action_name); // We can't check the type (a range) that will be returned before getting the range hint. g_return_if_fail( variantBase.is_of_type(type_glib_variant::variant_type()) ); - const type_glib_variant variantDerived = variantBase.cast_dynamic<type_glib_variant>(variantBase); + const auto variantDerived = variantBase.cast_dynamic<type_glib_variant>(variantBase); value = variantDerived.get(); } diff --git a/gio/src/actionmap.ccg b/gio/src/actionmap.ccg index 432b65f8..a294bddc 100644 --- a/gio/src/actionmap.ccg +++ b/gio/src/actionmap.ccg @@ -25,21 +25,21 @@ namespace Gio Glib::RefPtr<SimpleAction> ActionMap::add_action(const Glib::ustring& name) { - Glib::RefPtr<SimpleAction> action = SimpleAction::create(name); + auto action = SimpleAction::create(name); add_action(action); return action; } Glib::RefPtr<SimpleAction> ActionMap::add_action_with_parameter(const Glib::ustring& name, const ActivateWithParameterSlot& slot) { - Glib::RefPtr<SimpleAction> action = add_action(name); + auto action = add_action(name); action->signal_activate().connect(slot); return action; } Glib::RefPtr<SimpleAction> ActionMap::add_action(const Glib::ustring& name, const ActivateSlot& slot) { - Glib::RefPtr<SimpleAction> action = add_action(name); + auto action = add_action(name); action->signal_activate().connect( sigc::hide(slot)); return action; @@ -48,7 +48,7 @@ Glib::RefPtr<SimpleAction> ActionMap::add_action(const Glib::ustring& name, cons Glib::RefPtr<SimpleAction> ActionMap::add_action_bool(const Glib::ustring& name, bool state) { - Glib::RefPtr<SimpleAction> action = SimpleAction::create_bool(name, state); + auto action = SimpleAction::create_bool(name, state); add_action(action); return action; } @@ -56,7 +56,7 @@ Glib::RefPtr<SimpleAction> ActionMap::add_action_bool(const Glib::ustring& name, //TODO: Use a slot that takes a bool? Glib::RefPtr<SimpleAction> ActionMap::add_action_bool(const Glib::ustring& name, const ActivateSlot& slot, bool state) { - Glib::RefPtr<SimpleAction> action = add_action_bool(name, state); + auto action = add_action_bool(name, state); action->signal_activate().connect( sigc::hide(slot)); return action; @@ -65,7 +65,7 @@ Glib::RefPtr<SimpleAction> ActionMap::add_action_bool(const Glib::ustring& name, //TODO: Use a slot that takes a string? Glib::RefPtr<SimpleAction> ActionMap::add_action_radio_string(const Glib::ustring& name, const Glib::ustring& state) { - Glib::RefPtr<SimpleAction> action = SimpleAction::create_radio_string(name, state); + auto action = SimpleAction::create_radio_string(name, state); add_action(action); return action; } @@ -79,7 +79,7 @@ static void on_action_radio_string(const Glib::VariantBase& parameter, const Gio //TODO: This syntax is odd: const Glib::Variant<Glib::ustring> variantDerived = parameter.cast_dynamic< Glib::Variant<Glib::ustring> >(parameter); - const Glib::ustring str = variantDerived.get(); + const auto str = variantDerived.get(); slot(str); } @@ -87,7 +87,7 @@ static void on_action_radio_string(const Glib::VariantBase& parameter, const Gio Glib::RefPtr<SimpleAction> ActionMap::add_action_radio_string(const Glib::ustring& name, const ActivateWithStringParameterSlot& slot, const Glib::ustring& state) { - Glib::RefPtr<SimpleAction> action = add_action_radio_string(name, state); + auto action = add_action_radio_string(name, state); action->signal_activate().connect( sigc::bind(sigc::ptr_fun(&on_action_radio_string), slot)); return action; @@ -101,7 +101,7 @@ static void on_action_radio_int(const Glib::VariantBase& parameter, const Gio::A //TODO: This syntax is odd: const Glib::Variant<int> variantDerived = parameter.cast_dynamic< Glib::Variant<int> >(parameter); - const int str = variantDerived.get(); + const auto str = variantDerived.get(); slot(str); } @@ -110,14 +110,14 @@ static void on_action_radio_int(const Glib::VariantBase& parameter, const Gio::A //TODO: Use a slot that takes an integer? Glib::RefPtr<SimpleAction> ActionMap::add_action_radio_integer(const Glib::ustring& name, gint32 state) { - Glib::RefPtr<SimpleAction> action = SimpleAction::create_radio_integer(name, state); + auto action = SimpleAction::create_radio_integer(name, state); add_action(action); return action; } Glib::RefPtr<SimpleAction> ActionMap::add_action_radio_integer(const Glib::ustring& name, const ActivateWithIntParameterSlot& slot, gint32 state) { - Glib::RefPtr<SimpleAction> action = add_action_radio_integer(name, state); + auto action = add_action_radio_integer(name, state); action->signal_activate().connect( sigc::bind(sigc::ptr_fun(&on_action_radio_int), slot)); return action; diff --git a/gio/src/application.ccg b/gio/src/application.ccg index 1952abae..59f17dd7 100644 --- a/gio/src/application.ccg +++ b/gio/src/application.ccg @@ -68,7 +68,7 @@ static void Application_signal_open_callback(GApplication* self, GFile** files, vec_files[i] = Glib::wrap(files[i], true); } - const Glib::ustring hint_str = (hint ? hint : Glib::ustring()); + const auto hint_str = (hint ? hint : Glib::ustring()); // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) @@ -101,7 +101,7 @@ static void Application_signal_open_notify_callback(GApplication* self, GFile** vec_files[i] = Glib::wrap(files[i], true); } - const Glib::ustring hint_str = (hint ? hint : Glib::ustring()); + const auto hint_str = (hint ? hint : Glib::ustring()); // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) @@ -202,13 +202,13 @@ gboolean Application_option_arg_callback(const gchar* option_name, const gchar* if (option_name[1] == '-') { // Long option name. - const Glib::ustring long_option_name = Glib::ustring(option_name+2); + const auto long_option_name = Glib::ustring(option_name+2); iterFind = option_arg_callback_data.find(long_option_name); } else { // Short option name. - const gchar short_option_name = option_name[1]; + const auto short_option_name = option_name[1]; for (iterFind = option_arg_callback_data.begin(); iterFind != option_arg_callback_data.end(); ++iterFind) { @@ -230,14 +230,14 @@ gboolean Application_option_arg_callback(const gchar* option_name, const gchar* { if (option_arg->is_filename_option()) { - const Glib::OptionGroup::SlotOptionArgFilename* the_slot = option_arg->get_slot_filename(); + const auto the_slot = option_arg->get_slot_filename(); lock.release(); const std::string cpp_value(value ? value : ""); return (*the_slot)(cpp_option_name, cpp_value, has_value); } else { - const Glib::OptionGroup::SlotOptionArgString* the_slot = option_arg->get_slot_string(); + const auto the_slot = option_arg->get_slot_string(); lock.release(); const Glib::ustring cpp_value(value ? value : ""); return (*the_slot)(cpp_option_name, cpp_value, has_value); @@ -303,7 +303,7 @@ void Application::unset_default() void Application_Class::open_callback(GApplication* self, GFile** files, gint n_files, const gchar *hint) { - Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>( + const auto obj_base = static_cast<Glib::ObjectBase*>( Glib::ObjectBase::_get_current_wrapper((GObject*)self)); // Non-gtkmmproc-generated custom classes implicitly call the default @@ -314,7 +314,7 @@ void Application_Class::open_callback(GApplication* self, GFile** files, if(obj_base && obj_base->is_derived_()) { - CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base); + const auto obj = dynamic_cast<CppObjectType* const>(obj_base); if(obj) // This can be NULL during destruction. { try // Trap C++ exceptions which would normally be lost because this is a C callback. @@ -325,7 +325,7 @@ void Application_Class::open_callback(GApplication* self, GFile** files, vec_files[i] = Glib::wrap(files[i], true); } - const Glib::ustring hint_str = (hint ? hint : Glib::ustring()); + const auto hint_str = (hint ? hint : Glib::ustring()); obj->on_open(vec_files, hint_str); return; @@ -337,7 +337,7 @@ void Application_Class::open_callback(GApplication* self, GFile** files, } } - BaseClassType *const base = static_cast<BaseClassType*>( + const auto base = static_cast<BaseClassType*>( g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class). ); @@ -353,7 +353,7 @@ Glib::SignalProxy2< void, const Application::type_vec_files&, const Glib::ustrin void Gio::Application::on_open(const Application::type_vec_files& files, const Glib::ustring& hint) { - BaseClassType *const base = static_cast<BaseClassType*>( + const auto base = static_cast<BaseClassType*>( g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class). ); @@ -397,7 +397,7 @@ void Application::add_main_option_entry( if (iterFind != option_arg_callback_data.end()) return; // Ignore duplicates - OptionArgCallbackData* callback_data = new OptionArgCallbackData(this, short_name, slot); + auto callback_data = new OptionArgCallbackData(this, short_name, slot); option_arg_callback_data[long_name] = callback_data; lock.release(); @@ -415,7 +415,7 @@ void Application::add_main_option_entry_filename( if (iterFind != option_arg_callback_data.end()) return; // Ignore duplicates - OptionArgCallbackData* callback_data = new OptionArgCallbackData(this, short_name, slot); + auto callback_data = new OptionArgCallbackData(this, short_name, slot); option_arg_callback_data[long_name] = callback_data; lock.release(); diff --git a/gio/src/asyncinitable.ccg b/gio/src/asyncinitable.ccg index 39d3f02e..3867ef0e 100644 --- a/gio/src/asyncinitable.ccg +++ b/gio/src/asyncinitable.ccg @@ -30,7 +30,7 @@ void AsyncInitable::init_async(const SlotAsyncReady& slot, // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_async_initable_init_async(gobj(), io_priority, Glib::unwrap(cancellable), &SignalProxy_async_callback, slot_copy); @@ -41,7 +41,7 @@ void AsyncInitable::init_async(const SlotAsyncReady& slot, int io_priority) // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_async_initable_init_async(gobj(), io_priority, 0, &SignalProxy_async_callback, slot_copy); @@ -51,7 +51,7 @@ void AsyncInitable_Class::init_async_vfunc_callback(GAsyncInitable* self, int io_priority, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { - Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>( + const auto obj_base = static_cast<Glib::ObjectBase*>( Glib::ObjectBase::_get_current_wrapper((GObject*)self)); // Non-gtkmmproc-generated custom classes implicitly call the default @@ -61,7 +61,7 @@ void AsyncInitable_Class::init_async_vfunc_callback(GAsyncInitable* self, // being overridden: if(obj_base && obj_base->is_derived_()) { - CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base); + const auto obj = dynamic_cast<CppObjectType* const>(obj_base); if(obj) // This can be NULL during destruction. { try // Trap C++ exceptions which would normally be lost because this is a C callback. @@ -82,7 +82,7 @@ void AsyncInitable_Class::init_async_vfunc_callback(GAsyncInitable* self, } } - BaseClassType *const base = static_cast<BaseClassType*>( + const auto base = static_cast<BaseClassType*>( g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface). g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface. ) ); @@ -95,7 +95,7 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge void Gio::AsyncInitable::init_async_vfunc(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority) { - BaseClassType *const base = static_cast<BaseClassType*>( + const auto base = static_cast<BaseClassType*>( g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface). g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface. ) ); @@ -110,7 +110,7 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) / gboolean AsyncInitable_Class::init_finish_vfunc_callback(GAsyncInitable* self, GAsyncResult* res, GError** error) { - Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>( + const auto obj_base = static_cast<Glib::ObjectBase*>( Glib::ObjectBase::_get_current_wrapper((GObject*)self)); // Non-gtkmmproc-generated custom classes implicitly call the default @@ -120,7 +120,7 @@ gboolean AsyncInitable_Class::init_finish_vfunc_callback(GAsyncInitable* self, // being overridden: if(obj_base && obj_base->is_derived_()) { - CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base); + const auto obj = dynamic_cast<CppObjectType* const>(obj_base); if(obj) // This can be NULL during destruction. { try // Trap C++ exceptions which would normally be lost because this is a C callback. @@ -135,7 +135,7 @@ gboolean AsyncInitable_Class::init_finish_vfunc_callback(GAsyncInitable* self, } } - BaseClassType *const base = static_cast<BaseClassType*>( + const auto base = static_cast<BaseClassType*>( g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface). g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface. ) ); @@ -150,7 +150,7 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Ge } bool Gio::AsyncInitable::init_finish_vfunc(const Glib::RefPtr<AsyncResult>& res) { - BaseClassType *const base = static_cast<BaseClassType*>( + const auto base = static_cast<BaseClassType*>( g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface). g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface. ) ); diff --git a/gio/src/asyncresult.ccg b/gio/src/asyncresult.ccg index 9697606e..b336f181 100644 --- a/gio/src/asyncresult.ccg +++ b/gio/src/asyncresult.ccg @@ -31,8 +31,8 @@ static GObject* unwrap_objectbase_custom(const Glib::RefPtr<Glib::ObjectBase>& c Glib::RefPtr<Glib::ObjectBase> AsyncResult::get_source_object_base() { - GObject* cobj = g_async_result_get_source_object(gobj()); - ObjectBase* cppobj = Glib::wrap_auto(cobj); //ObjectBase::_get_current_wrapper(cobj); + auto cobj = g_async_result_get_source_object(gobj()); + auto cppobj = Glib::wrap_auto(cobj); //ObjectBase::_get_current_wrapper(cobj); return Glib::RefPtr<Glib::ObjectBase>(cppobj); //g_async_result_get_source_object() gives us a ref, unusually. //TODO: For some reason this fails: Glib::wrap(cobj); } diff --git a/gio/src/bufferedinputstream.ccg b/gio/src/bufferedinputstream.ccg index b015f9a9..af74ea92 100644 --- a/gio/src/bufferedinputstream.ccg +++ b/gio/src/bufferedinputstream.ccg @@ -36,7 +36,7 @@ void BufferedInputStream::fill_async(const SlotAsyncReady& slot, // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_buffered_input_stream_fill_async(gobj(), count, @@ -53,7 +53,7 @@ void BufferedInputStream::fill_async(const SlotAsyncReady& slot, // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_buffered_input_stream_fill_async(gobj(), count, diff --git a/gio/src/cancellable.ccg b/gio/src/cancellable.ccg index a266e7e5..787990e1 100644 --- a/gio/src/cancellable.ccg +++ b/gio/src/cancellable.ccg @@ -43,7 +43,7 @@ void slot_cancelled_proxy(GCancellable * /*cancellable*/, gpointer data) gulong Cancellable::connect(const SlotCancelledCallback& slot) { - SlotCancelledCallback* slot_copy = new SlotCancelledCallback(slot); + auto slot_copy = new SlotCancelledCallback(slot); return g_cancellable_connect (gobj(), G_CALLBACK(slot_cancelled_proxy), slot_copy, diff --git a/gio/src/datainputstream.ccg b/gio/src/datainputstream.ccg index 485c7b1e..0b4b4691 100644 --- a/gio/src/datainputstream.ccg +++ b/gio/src/datainputstream.ccg @@ -65,7 +65,7 @@ void DataInputStream::read_line_async(const SlotAsyncReady& slot, const Glib::Re // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_data_input_stream_read_line_async(gobj(), io_priority, @@ -138,7 +138,7 @@ void DataInputStream::read_until_async(const std::string& stop_chars, const Slot // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_data_input_stream_read_until_async(gobj(), stop_chars.c_str(), io_priority, @@ -215,7 +215,7 @@ void DataInputStream::read_upto_async(const std::string& stop_chars, const SlotA // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_data_input_stream_read_upto_async(gobj(), stop_chars.c_str(), -1, /* null-terminated */ io_priority, diff --git a/gio/src/dbusaddress.ccg b/gio/src/dbusaddress.ccg index 2fe11d9b..2bcb7d7c 100644 --- a/gio/src/dbusaddress.ccg +++ b/gio/src/dbusaddress.ccg @@ -47,14 +47,14 @@ bool is_supported(const std::string& address) void get_stream(const std::string& address, const SlotAsyncReady slot, const Glib::RefPtr<Cancellable>& cancellable) { - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_dbus_address_get_stream(address.c_str(), Glib::unwrap(cancellable), &SignalProxy_async_callback, slot_copy); } void get_stream(const std::string& address, const SlotAsyncReady slot) { - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_dbus_address_get_stream(address.c_str(), 0, &SignalProxy_async_callback, slot_copy); } diff --git a/gio/src/dbusconnection.ccg b/gio/src/dbusconnection.ccg index f2f60355..31020505 100644 --- a/gio/src/dbusconnection.ccg +++ b/gio/src/dbusconnection.ccg @@ -68,7 +68,7 @@ static GDBusMessage* DBusConnection_Message_Filter_giomm_callback( try { - Glib::RefPtr<Gio::DBus::Message> result = (*the_slot)( + auto result = (*the_slot)( Glib::wrap(connection, true), Glib::wrap(message, true), static_cast<bool>(incoming)); return (result) ? result->gobj_copy() : 0; @@ -477,7 +477,7 @@ Glib::RefPtr<Connection> Connection::create_for_address_sync( void Connection::get(BusType bus_type, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable) { - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_bus_get(static_cast<GBusType>(bus_type), Glib::unwrap(cancellable), &SignalProxy_async_callback, slot_copy); @@ -486,7 +486,7 @@ void Connection::get(BusType bus_type, const SlotAsyncReady& slot, //static void Connection::get(BusType bus_type, const SlotAsyncReady& slot) { - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_bus_get(static_cast<GBusType>(bus_type), 0, &SignalProxy_async_callback, slot_copy); @@ -499,7 +499,7 @@ void Connection::close() void Connection::close(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable) { - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_dbus_connection_close(gobj(), Glib::unwrap(cancellable), @@ -509,7 +509,7 @@ void Connection::close(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellabl void Connection::close(const SlotAsyncReady& slot) { - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_dbus_connection_close(gobj(), 0, @@ -524,7 +524,7 @@ void Connection::flush() void Connection::flush(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable) { - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_dbus_connection_flush(gobj(), Glib::unwrap(cancellable), @@ -534,7 +534,7 @@ void Connection::flush(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellabl void Connection::flush(const SlotAsyncReady& slot) { - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_dbus_connection_flush(gobj(), 0, @@ -559,7 +559,7 @@ bool Connection::send_message(const Glib::RefPtr<Message>& message, void Connection::send_message_with_reply(const Glib::RefPtr<Message>& message, int timeout_msec,const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable) { - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); volatile guint32 out_serial = 0; g_dbus_connection_send_message_with_reply(gobj(), Glib::unwrap(message), static_cast<GDBusSendMessageFlags>(message->get_flags()), @@ -571,7 +571,7 @@ void Connection::send_message_with_reply(const Glib::RefPtr<Message>& message, i void Connection::send_message_with_reply(const Glib::RefPtr<Message>& message, int timeout_msec,const SlotAsyncReady& slot) { - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); volatile guint32 out_serial = 0; g_dbus_connection_send_message_with_reply(gobj(), Glib::unwrap(message), static_cast<GDBusSendMessageFlags>(message->get_flags()), @@ -635,7 +635,7 @@ void Connection::call( // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_dbus_connection_call(gobj(), bus_name.c_str(), object_path.c_str(), interface_name.c_str(), method_name.c_str(), @@ -659,7 +659,7 @@ void Connection::call( // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_dbus_connection_call(gobj(), bus_name.c_str(), object_path.c_str(), interface_name.c_str(), method_name.c_str(), @@ -737,7 +737,7 @@ void Connection::call( // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_dbus_connection_call_with_unix_fd_list(gobj(), bus_name.c_str(), object_path.c_str(), interface_name.c_str(), method_name.c_str(), @@ -762,7 +762,7 @@ void Connection::call( // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_dbus_connection_call_with_unix_fd_list(gobj(), bus_name.c_str(), object_path.c_str(), interface_name.c_str(), method_name.c_str(), @@ -805,7 +805,7 @@ guint Connection::signal_subscribe( const Glib::ustring& arg0, SignalFlags flags) { - SlotSignal* slot_copy = new SlotSignal(slot); + auto slot_copy = new SlotSignal(slot); return g_dbus_connection_signal_subscribe(gobj(), sender.c_str(), interface_name.c_str(), member.c_str(), object_path.c_str(), arg0.c_str(), @@ -816,7 +816,7 @@ guint Connection::signal_subscribe( guint Connection::add_filter(const SlotMessageFilter& slot) { - SlotMessageFilter* slot_copy = new SlotMessageFilter(slot); + auto slot_copy = new SlotMessageFilter(slot); return g_dbus_connection_add_filter(gobj(), &DBusConnection_Message_Filter_giomm_callback, slot_copy, diff --git a/gio/src/dbusownname.ccg b/gio/src/dbusownname.ccg index d295247d..49de2042 100644 --- a/gio/src/dbusownname.ccg +++ b/gio/src/dbusownname.ccg @@ -37,8 +37,8 @@ extern "C" static void Bus_Acquired_giomm_callback(GDBusConnection* connection, const gchar* name, gpointer data) { - OwnSlots* slots = static_cast<OwnSlots*>(data); - Gio::DBus::SlotBusAcquired* the_slot = slots->bus_acquired_slot; + auto slots = static_cast<OwnSlots*>(data); + auto the_slot = slots->bus_acquired_slot; try { @@ -53,8 +53,8 @@ static void Bus_Acquired_giomm_callback(GDBusConnection* connection, static void Bus_Name_Acquired_giomm_callback(GDBusConnection* connection, const gchar* name, gpointer data) { - OwnSlots* slots = static_cast<OwnSlots*>(data); - Gio::DBus::SlotNameAcquired* the_slot = slots->name_acquired_slot; + auto slots = static_cast<OwnSlots*>(data); + auto the_slot = slots->name_acquired_slot; try { @@ -69,8 +69,8 @@ static void Bus_Name_Acquired_giomm_callback(GDBusConnection* connection, static void Bus_Name_Lost_giomm_callback(GDBusConnection* connection, const gchar* name, gpointer data) { - OwnSlots* slots = static_cast<OwnSlots*>(data); - Gio::DBus::SlotNameLost* the_slot = slots->name_lost_slot; + auto slots = static_cast<OwnSlots*>(data); + auto the_slot = slots->name_lost_slot; try { @@ -84,7 +84,7 @@ static void Bus_Name_Lost_giomm_callback(GDBusConnection* connection, static void Bus_Own_Name_giomm_callback_destroy(void* data) { - OwnSlots* slots = static_cast<OwnSlots*>(data); + auto slots = static_cast<OwnSlots*>(data); if(slots->bus_acquired_slot) delete slots->bus_acquired_slot; @@ -118,7 +118,7 @@ guint own_name( BusNameOwnerFlags flags ) { - struct OwnSlots* slots = new OwnSlots; + auto slots = new OwnSlots; // Make copies of the slots which will be deleted on destroy notification. slots->bus_acquired_slot = new SlotBusAcquired(bus_acquired_slot); diff --git a/gio/src/dbusproxy.ccg b/gio/src/dbusproxy.ccg index 3c93d4b1..25014f6d 100644 --- a/gio/src/dbusproxy.ccg +++ b/gio/src/dbusproxy.ccg @@ -296,7 +296,7 @@ void Proxy::call(const Glib::ustring& method_name, // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_dbus_proxy_call(gobj(), method_name.c_str(), const_cast<GVariant*>(parameters.gobj()), @@ -314,7 +314,7 @@ void Proxy::call(const Glib::ustring& method_name, // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_dbus_proxy_call(gobj(), method_name.c_str(), const_cast<GVariant*>(parameters.gobj()), @@ -378,7 +378,7 @@ void Proxy::call( // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_dbus_proxy_call_with_unix_fd_list(gobj(), method_name.c_str(), const_cast<GVariant*>(parameters.gobj()), @@ -398,7 +398,7 @@ void Proxy::call( // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_dbus_proxy_call_with_unix_fd_list(gobj(), method_name.c_str(), const_cast<GVariant*>(parameters.gobj()), diff --git a/gio/src/dbuswatchname.ccg b/gio/src/dbuswatchname.ccg index ca9947bb..0900b6a0 100644 --- a/gio/src/dbuswatchname.ccg +++ b/gio/src/dbuswatchname.ccg @@ -36,8 +36,8 @@ extern "C" static void Bus_Name_Appeared_giomm_callback(GDBusConnection* connection, const gchar* name, const char* name_owner, gpointer data) { - WatchSlots* slots = static_cast<WatchSlots*>(data); - Gio::DBus::SlotNameAppeared* the_slot = slots->name_appeared_slot; + auto slots = static_cast<WatchSlots*>(data); + auto the_slot = slots->name_appeared_slot; try { @@ -53,8 +53,8 @@ static void Bus_Name_Appeared_giomm_callback(GDBusConnection* connection, static void Bus_Name_Vanished_giomm_callback(GDBusConnection* connection, const gchar* name, gpointer data) { - WatchSlots* slots = static_cast<WatchSlots*>(data); - Gio::DBus::SlotNameVanished* the_slot = slots->name_vanished_slot; + auto slots = static_cast<WatchSlots*>(data); + auto the_slot = slots->name_vanished_slot; try { @@ -68,7 +68,7 @@ static void Bus_Name_Vanished_giomm_callback(GDBusConnection* connection, static void Bus_Watch_Name_giomm_callback_destroy(void* data) { - WatchSlots* slots = static_cast<WatchSlots*>(data); + auto slots = static_cast<WatchSlots*>(data); if(slots->name_appeared_slot) delete slots->name_appeared_slot; @@ -98,7 +98,7 @@ guint watch_name( BusNameWatcherFlags flags ) { - struct WatchSlots* slots = new WatchSlots; + auto slots = new WatchSlots; // Make copies of the slots which will be deleted on destroy notification. slots->name_appeared_slot = new SlotNameAppeared(name_appeared_slot); @@ -118,7 +118,7 @@ guint watch_name( BusNameWatcherFlags flags ) { - struct WatchSlots* slots = new WatchSlots; + auto slots = new WatchSlots; // Make copies of the slots which will be deleted on destroy notification. slots->name_appeared_slot = new SlotNameAppeared(name_appeared_slot); diff --git a/gio/src/drive.ccg b/gio/src/drive.ccg index c0568616..da3fe0e0 100644 --- a/gio/src/drive.ccg +++ b/gio/src/drive.ccg @@ -31,7 +31,7 @@ void Drive::eject(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& c // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_drive_eject_with_operation(gobj(), static_cast<GMountUnmountFlags>(flags), @@ -46,7 +46,7 @@ void Drive::eject(const SlotAsyncReady& slot, MountUnmountFlags flags) // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_drive_eject_with_operation(gobj(), static_cast<GMountUnmountFlags>(flags), @@ -61,7 +61,7 @@ void Drive::eject(const Glib::RefPtr<MountOperation>& mount_operation, const Slo // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_drive_eject_with_operation(gobj(), static_cast<GMountUnmountFlags>(flags), @@ -76,7 +76,7 @@ void Drive::eject(const Glib::RefPtr<MountOperation>& mount_operation, const Slo // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_drive_eject_with_operation(gobj(), static_cast<GMountUnmountFlags>(flags), @@ -111,7 +111,7 @@ void Drive::poll_for_media(const SlotAsyncReady& slot, const Glib::RefPtr<Cancel // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_drive_poll_for_media(gobj(), Glib::unwrap(cancellable), @@ -124,7 +124,7 @@ void Drive::poll_for_media(const SlotAsyncReady& slot) // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_drive_poll_for_media(gobj(), 0, // cancellable @@ -149,7 +149,7 @@ Drive::stop(const Glib::RefPtr<MountOperation>& mount_operation, // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_drive_stop(gobj(), static_cast<GMountUnmountFlags>(flags), @@ -167,7 +167,7 @@ Drive::stop(const Glib::RefPtr<MountOperation>& mount_operation, // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_drive_stop(gobj(), static_cast<GMountUnmountFlags>(flags), @@ -187,7 +187,7 @@ Drive::start(const Glib::RefPtr<MountOperation>& mount_operation, // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_drive_start(gobj(), static_cast<GDriveStartFlags>(flags), @@ -205,7 +205,7 @@ Drive::start(const Glib::RefPtr<MountOperation>& mount_operation, // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_drive_start(gobj(), static_cast<GDriveStartFlags>(flags), diff --git a/gio/src/file.ccg b/gio/src/file.ccg index 639d4d78..56516ea1 100644 --- a/gio/src/file.ccg +++ b/gio/src/file.ccg @@ -36,7 +36,7 @@ SignalProxy_file_progress_callback(goffset current_num_bytes, goffset total_num_bytes, gpointer data) { - Gio::File::SlotFileProgress* the_slot = static_cast<Gio::File::SlotFileProgress*>(data); + auto the_slot = static_cast<Gio::File::SlotFileProgress*>(data); try { @@ -56,14 +56,14 @@ SignalProxy_file_progress_callback(goffset current_num_bytes, static void SignalProxy_file_copy_async_callback(GObject*, GAsyncResult* res, void* data) { - CopySlots* slot_pair = static_cast<CopySlots*>(data); - Gio::SlotAsyncReady* the_slot = slot_pair->second; + auto slot_pair = static_cast<CopySlots*>(data); + auto the_slot = slot_pair->second; try { if(*the_slot) { - Glib::RefPtr<Gio::AsyncResult> result = Glib::wrap(res, true /* take copy */); + auto result = Glib::wrap(res, true /* take copy */); (*the_slot)(result); } } @@ -84,14 +84,14 @@ SignalProxy_file_copy_async_callback(GObject*, GAsyncResult* res, void* data) static void SignalProxy_file_measure_async_callback(GObject*, GAsyncResult* res, void* data) { - MeasureSlots* slot_pair = static_cast<MeasureSlots*>(data); - Gio::SlotAsyncReady* the_slot = slot_pair->second; + auto slot_pair = static_cast<MeasureSlots*>(data); + auto the_slot = slot_pair->second; try { if(*the_slot) { - Glib::RefPtr<Gio::AsyncResult> result = Glib::wrap(res, true /* take copy */); + auto result = Glib::wrap(res, true /* take copy */); (*the_slot)(result); } } @@ -108,8 +108,8 @@ SignalProxy_file_measure_async_callback(GObject*, GAsyncResult* res, void* data) static gboolean SignalProxy_load_partial_contents_read_more_callback(const char* file_contents, goffset file_size, gpointer data) { - LoadPartialSlots* slot_pair = static_cast<LoadPartialSlots*>(data); - Gio::File::SlotReadMore* the_slot = slot_pair->first; + auto slot_pair = static_cast<LoadPartialSlots*>(data); + auto the_slot = slot_pair->first; bool result = false; diff --git a/gio/src/fileattributeinfolist.ccg b/gio/src/fileattributeinfolist.ccg index b4320457..7332e3d2 100644 --- a/gio/src/fileattributeinfolist.ccg +++ b/gio/src/fileattributeinfolist.ccg @@ -35,7 +35,7 @@ bool FileAttributeInfoList::empty() const FileAttributeInfo FileAttributeInfoList::lookup(const std::string& name) const { - GFileAttributeInfoList* cobject = const_cast<GFileAttributeInfoList*>(gobj()); + auto cobject = const_cast<GFileAttributeInfoList*>(gobj()); const GFileAttributeInfo* cinfo = g_file_attribute_info_list_lookup (cobject, name.c_str()); diff --git a/gio/src/fileenumerator.ccg b/gio/src/fileenumerator.ccg index 49a893af..d5cb85cb 100644 --- a/gio/src/fileenumerator.ccg +++ b/gio/src/fileenumerator.ccg @@ -32,7 +32,7 @@ FileEnumerator::next_files_async(const SlotAsyncReady& slot, const Glib::RefPtr< // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_file_enumerator_next_files_async(gobj(), num_files, @@ -48,7 +48,7 @@ FileEnumerator::next_files_async(const SlotAsyncReady& slot, int num_files, int // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_file_enumerator_next_files_async(gobj(), num_files, @@ -66,7 +66,7 @@ FileEnumerator::close_async(int io_priority, // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_file_enumerator_close_async(gobj(), io_priority, @@ -82,7 +82,7 @@ FileEnumerator::close_async(int io_priority, // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_file_enumerator_close_async(gobj(), io_priority, diff --git a/gio/src/fileinputstream.ccg b/gio/src/fileinputstream.ccg index 9dc275e2..087f9701 100644 --- a/gio/src/fileinputstream.ccg +++ b/gio/src/fileinputstream.ccg @@ -27,7 +27,7 @@ namespace Gio Glib::RefPtr<FileInfo> FileInputStream::query_info(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes) { GError* gerror = 0; - Glib::RefPtr<FileInfo> retvalue = Glib::wrap(g_file_input_stream_query_info(gobj(), g_strdup((attributes).c_str()), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror))); + auto retvalue = Glib::wrap(g_file_input_stream_query_info(gobj(), g_strdup((attributes).c_str()), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror))); if(gerror) ::Glib::Error::throw_exception(gerror); @@ -37,7 +37,7 @@ Glib::RefPtr<FileInfo> FileInputStream::query_info(const Glib::RefPtr<Cancellabl Glib::RefPtr<FileInfo> FileInputStream::query_info(const std::string& attributes) { GError* gerror = 0; - Glib::RefPtr<FileInfo> retvalue = Glib::wrap(g_file_input_stream_query_info(gobj(), g_strdup((attributes).c_str()), 0, &(gerror))); + auto retvalue = Glib::wrap(g_file_input_stream_query_info(gobj(), g_strdup((attributes).c_str()), 0, &(gerror))); if(gerror) ::Glib::Error::throw_exception(gerror); @@ -50,7 +50,7 @@ FileInputStream::query_info_async(const SlotAsyncReady& slot, const Glib::RefPtr // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_file_input_stream_query_info_async(gobj(), const_cast<char*>(attributes.c_str()), @@ -66,7 +66,7 @@ FileInputStream::query_info_async(const SlotAsyncReady& slot, const std::string& // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_file_input_stream_query_info_async(gobj(), const_cast<char*>(attributes.c_str()), diff --git a/gio/src/fileiostream.ccg b/gio/src/fileiostream.ccg index 5ae6ac50..ed8757b9 100644 --- a/gio/src/fileiostream.ccg +++ b/gio/src/fileiostream.ccg @@ -27,7 +27,7 @@ namespace Gio Glib::RefPtr<FileInfo> FileIOStream::query_info(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes) { GError* gerror = 0; - Glib::RefPtr<FileInfo> retvalue = Glib::wrap(g_file_io_stream_query_info(gobj(), g_strdup((attributes).c_str()), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror))); + auto retvalue = Glib::wrap(g_file_io_stream_query_info(gobj(), g_strdup((attributes).c_str()), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror))); if(gerror) ::Glib::Error::throw_exception(gerror); @@ -37,7 +37,7 @@ Glib::RefPtr<FileInfo> FileIOStream::query_info(const Glib::RefPtr<Cancellable>& Glib::RefPtr<FileInfo> FileIOStream::query_info(const std::string& attributes) { GError* gerror = 0; - Glib::RefPtr<FileInfo> retvalue = Glib::wrap(g_file_io_stream_query_info(gobj(), g_strdup((attributes).c_str()), 0, &(gerror))); + auto retvalue = Glib::wrap(g_file_io_stream_query_info(gobj(), g_strdup((attributes).c_str()), 0, &(gerror))); if(gerror) ::Glib::Error::throw_exception(gerror); @@ -50,7 +50,7 @@ FileIOStream::query_info_async(const SlotAsyncReady& slot, const Glib::RefPtr<Ca // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_file_io_stream_query_info_async(gobj(), const_cast<char*>(attributes.c_str()), @@ -66,7 +66,7 @@ FileIOStream::query_info_async(const SlotAsyncReady& slot, const std::string& at // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_file_io_stream_query_info_async(gobj(), const_cast<char*>(attributes.c_str()), diff --git a/gio/src/fileoutputstream.ccg b/gio/src/fileoutputstream.ccg index e46308cb..7b940feb 100644 --- a/gio/src/fileoutputstream.ccg +++ b/gio/src/fileoutputstream.ccg @@ -29,7 +29,7 @@ namespace Gio Glib::RefPtr<FileInfo> FileOutputStream::query_info(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes) { GError* gerror = 0; - Glib::RefPtr<FileInfo> retvalue = Glib::wrap(g_file_output_stream_query_info(gobj(), g_strdup((attributes).c_str()), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror))); + auto retvalue = Glib::wrap(g_file_output_stream_query_info(gobj(), g_strdup((attributes).c_str()), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror))); if(gerror) ::Glib::Error::throw_exception(gerror); @@ -41,7 +41,7 @@ Glib::RefPtr<FileInfo> FileOutputStream::query_info(const Glib::RefPtr<Cancellab Glib::RefPtr<FileInfo> FileOutputStream::query_info(const std::string& attributes) { GError* gerror = 0; - Glib::RefPtr<FileInfo> retvalue = Glib::wrap(g_file_output_stream_query_info(gobj(), g_strdup((attributes).c_str()), 0, &(gerror))); + auto retvalue = Glib::wrap(g_file_output_stream_query_info(gobj(), g_strdup((attributes).c_str()), 0, &(gerror))); if(gerror) ::Glib::Error::throw_exception(gerror); @@ -56,7 +56,7 @@ FileOutputStream::query_info_async(const SlotAsyncReady& slot, const Glib::RefPt // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_file_output_stream_query_info_async(gobj(), const_cast<char*>(attributes.c_str()), @@ -72,7 +72,7 @@ FileOutputStream::query_info_async(const SlotAsyncReady& slot, const std::string // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_file_output_stream_query_info_async(gobj(), const_cast<char*>(attributes.c_str()), diff --git a/gio/src/icon.ccg b/gio/src/icon.ccg index 7b77fa4c..76295bf6 100644 --- a/gio/src/icon.ccg +++ b/gio/src/icon.ccg @@ -33,7 +33,7 @@ Icon::equal(const Glib::RefPtr<Icon>& other) const Glib::RefPtr<Icon> Icon::create(const std::string& str) { GError* gerror = 0; - GIcon* icon = g_icon_new_for_string(str.c_str(), &gerror); + auto icon = g_icon_new_for_string(str.c_str(), &gerror); if(gerror) ::Glib::Error::throw_exception(gerror); diff --git a/gio/src/inputstream.ccg b/gio/src/inputstream.ccg index 82d0c134..54a82620 100644 --- a/gio/src/inputstream.ccg +++ b/gio/src/inputstream.ccg @@ -31,7 +31,7 @@ InputStream::read_async(void* buffer, gsize count, const SlotAsyncReady& slot, c // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_input_stream_read_async(gobj(), buffer, @@ -48,7 +48,7 @@ InputStream::read_async(void* buffer, gsize count, const SlotAsyncReady& slot, i // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_input_stream_read_async(gobj(), buffer, @@ -66,7 +66,7 @@ InputStream::read_all_async(void* buffer, gsize count, const SlotAsyncReady& slo // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_input_stream_read_all_async(gobj(), buffer, @@ -83,7 +83,7 @@ InputStream::read_all_async(void* buffer, gsize count, const SlotAsyncReady& slo // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_input_stream_read_all_async(gobj(), buffer, @@ -101,7 +101,7 @@ InputStream::read_bytes_async(gsize count, const SlotAsyncReady& slot, const Gli // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_input_stream_read_bytes_async(gobj(), count, @@ -117,7 +117,7 @@ InputStream::read_bytes_async(gsize count, const SlotAsyncReady& slot, int io_pr // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_input_stream_read_bytes_async(gobj(), count, @@ -134,7 +134,7 @@ InputStream::skip_async(gsize count, const SlotAsyncReady& slot, const Glib::Ref // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_input_stream_skip_async(gobj(), count, @@ -150,7 +150,7 @@ InputStream::skip_async(gsize count, const SlotAsyncReady& slot, int io_priority // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_input_stream_skip_async(gobj(), count, @@ -166,7 +166,7 @@ InputStream::close_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancella // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_input_stream_close_async(gobj(), io_priority, @@ -181,7 +181,7 @@ InputStream::close_async(const SlotAsyncReady& slot, int io_priority) // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_input_stream_close_async(gobj(), io_priority, diff --git a/gio/src/iostream.ccg b/gio/src/iostream.ccg index c1aae465..49b8280c 100644 --- a/gio/src/iostream.ccg +++ b/gio/src/iostream.ccg @@ -31,7 +31,7 @@ IOStream::close_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_io_stream_close_async(gobj(), io_priority, @@ -46,7 +46,7 @@ IOStream::close_async(const SlotAsyncReady& slot, int io_priority) // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_io_stream_close_async(gobj(), io_priority, @@ -63,7 +63,7 @@ IOStream::splice_async(const Glib::RefPtr<IOStream>& stream2, // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_io_stream_splice_async(gobj(), Glib::unwrap(stream2), static_cast<GIOStreamSpliceFlags>(flags), io_priority, @@ -77,7 +77,7 @@ IOStream::splice_async(const Glib::RefPtr<IOStream>& stream2, // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_io_stream_splice_async(gobj(), Glib::unwrap(stream2), static_cast<GIOStreamSpliceFlags>(flags), io_priority, 0, diff --git a/gio/src/loadableicon.ccg b/gio/src/loadableicon.ccg index 2ff4d601..20281191 100644 --- a/gio/src/loadableicon.ccg +++ b/gio/src/loadableicon.ccg @@ -74,7 +74,7 @@ LoadableIcon::load_async(int size, const SlotAsyncReady& slot, const // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_loadable_icon_load_async(gobj(), size, @@ -89,7 +89,7 @@ LoadableIcon::load_async(int size, const SlotAsyncReady& slot) // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_loadable_icon_load_async(gobj(), size, diff --git a/gio/src/memoryinputstream.ccg b/gio/src/memoryinputstream.ccg index 0dfd768d..344506d6 100644 --- a/gio/src/memoryinputstream.ccg +++ b/gio/src/memoryinputstream.ccg @@ -41,7 +41,7 @@ private: void destroy_data_callback(void* user_data) { - SlotWithData* slot_with_data = static_cast<SlotWithData*>(user_data); + auto slot_with_data = static_cast<SlotWithData*>(user_data); g_return_if_fail(slot_with_data != 0); try @@ -84,8 +84,8 @@ _DEPRECATE_IFDEF_END void MemoryInputStream::add_data(const void* data, gssize len, const SlotDestroyData& destroy_slot) { - SlotWithData* slot_with_data = new SlotWithData(destroy_slot, const_cast<void*>(data)); - GBytes* bytes = g_bytes_new_with_free_func(data, len, &destroy_data_callback, slot_with_data); + auto slot_with_data = new SlotWithData(destroy_slot, const_cast<void*>(data)); + auto bytes = g_bytes_new_with_free_func(data, len, &destroy_data_callback, slot_with_data); g_memory_input_stream_add_bytes(gobj(), bytes); g_bytes_unref(bytes); // g_memory_input_stream_add_bytes() takes a reference } diff --git a/gio/src/mount.ccg b/gio/src/mount.ccg index 6d1ac668..522a700f 100644 --- a/gio/src/mount.ccg +++ b/gio/src/mount.ccg @@ -32,7 +32,7 @@ void Mount::unmount(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_mount_unmount_with_operation(gobj(), GMountUnmountFlags(flags), @@ -47,7 +47,7 @@ void Mount::unmount(const SlotAsyncReady& slot, MountUnmountFlags flags) // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_mount_unmount_with_operation(gobj(), GMountUnmountFlags(flags), @@ -73,7 +73,7 @@ void Mount::unmount(const Glib::RefPtr<MountOperation>& mount_operation, // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_mount_unmount_with_operation(gobj(), GMountUnmountFlags(flags), @@ -89,7 +89,7 @@ void Mount::unmount(const Glib::RefPtr<MountOperation>& mount_operation, // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_mount_unmount_with_operation(gobj(), GMountUnmountFlags(flags), @@ -116,7 +116,7 @@ void Mount::remount(const Glib::RefPtr<MountOperation>& operation, const SlotAsy // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_mount_remount(gobj(), static_cast<GMountMountFlags>(flags), @@ -131,7 +131,7 @@ void Mount::remount(const Glib::RefPtr<MountOperation>& operation, const SlotAsy // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_mount_remount(gobj(), static_cast<GMountMountFlags>(flags), @@ -166,7 +166,7 @@ void Mount::eject(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& c // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_mount_eject_with_operation(gobj(), GMountUnmountFlags(flags), @@ -181,7 +181,7 @@ void Mount::eject(const SlotAsyncReady& slot, MountUnmountFlags flags) // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_mount_eject_with_operation(gobj(), GMountUnmountFlags(flags), @@ -206,7 +206,7 @@ void Mount::eject(const Glib::RefPtr<MountOperation>& mount_operation, const Slo // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_mount_eject_with_operation(gobj(), GMountUnmountFlags(flags), @@ -221,7 +221,7 @@ void Mount::eject(const Glib::RefPtr<MountOperation>& mount_operation, const Slo // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_mount_eject_with_operation(gobj(), GMountUnmountFlags(flags), @@ -247,7 +247,7 @@ void Mount::guess_content_type(const SlotAsyncReady& slot, const Glib::RefPtr<Ca // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_mount_guess_content_type(gobj(), force_rescan, @@ -261,7 +261,7 @@ void Mount::guess_content_type(const SlotAsyncReady& slot, bool force_rescan) // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_mount_guess_content_type(gobj(), force_rescan, diff --git a/gio/src/networkaddress.ccg b/gio/src/networkaddress.ccg index 182b5075..20cae4a2 100644 --- a/gio/src/networkaddress.ccg +++ b/gio/src/networkaddress.ccg @@ -29,7 +29,7 @@ Glib::RefPtr<NetworkAddress> NetworkAddress::parse(const std::string& host_and_port, guint16 default_port) { GError *error = 0; - GNetworkAddress *address = G_NETWORK_ADDRESS + auto *address = G_NETWORK_ADDRESS (g_network_address_parse (host_and_port.c_str (), default_port, &error)); if (error) diff --git a/gio/src/networkmonitor.ccg b/gio/src/networkmonitor.ccg index aaa5ee13..550a6ac3 100644 --- a/gio/src/networkmonitor.ccg +++ b/gio/src/networkmonitor.ccg @@ -26,7 +26,7 @@ void NetworkMonitor::can_reach_async(const Glib::RefPtr<SocketConnectable>& conn // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_network_monitor_can_reach_async(gobj(), Glib::unwrap(connectable), diff --git a/gio/src/outputstream.ccg b/gio/src/outputstream.ccg index 0ed1e138..5ac47fbd 100644 --- a/gio/src/outputstream.ccg +++ b/gio/src/outputstream.ccg @@ -30,7 +30,7 @@ OutputStream::write_async(const void* buffer, gsize count, const SlotAsyncReady& // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_output_stream_write_async(gobj(), buffer, @@ -47,7 +47,7 @@ OutputStream::write_async(const void* buffer, gsize count, const SlotAsyncReady& // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_output_stream_write_async(gobj(), buffer, @@ -66,7 +66,7 @@ OutputStream::write_all_async(const void* buffer, gsize count, const SlotAsyncRe // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_output_stream_write_all_async(gobj(), buffer, @@ -83,7 +83,7 @@ OutputStream::write_all_async(const void* buffer, gsize count, const SlotAsyncRe // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_output_stream_write_all_async(gobj(), buffer, @@ -101,7 +101,7 @@ OutputStream::splice_async(const Glib::RefPtr<InputStream>& source, const SlotAs // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_output_stream_splice_async(gobj(), Glib::unwrap(source), @@ -118,7 +118,7 @@ OutputStream::splice_async(const Glib::RefPtr<InputStream>& source, const SlotAs // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_output_stream_splice_async(gobj(), Glib::unwrap(source), @@ -135,7 +135,7 @@ OutputStream::flush_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancell // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_output_stream_flush_async(gobj(), io_priority, @@ -150,7 +150,7 @@ OutputStream::flush_async(const SlotAsyncReady& slot, int io_priority) // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_output_stream_flush_async(gobj(), io_priority, @@ -165,7 +165,7 @@ OutputStream::close_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancell // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_output_stream_close_async(gobj(), io_priority, @@ -180,7 +180,7 @@ OutputStream::close_async(const SlotAsyncReady& slot, int io_priority) // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_output_stream_close_async(gobj(), io_priority, diff --git a/gio/src/proxy.ccg b/gio/src/proxy.ccg index 232333e0..f5248362 100644 --- a/gio/src/proxy.ccg +++ b/gio/src/proxy.ccg @@ -31,7 +31,7 @@ void Proxy::connect_async(const Glib::RefPtr<IOStream>& connection, const Glib:: // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_proxy_connect_async(gobj(), Glib::unwrap(connection), @@ -46,7 +46,7 @@ void Proxy::connect_async(const Glib::RefPtr<IOStream>& connection, const Glib:: // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_proxy_connect_async(gobj(), Glib::unwrap(connection), diff --git a/gio/src/proxyresolver.ccg b/gio/src/proxyresolver.ccg index 3fd2d6a8..72cad04e 100644 --- a/gio/src/proxyresolver.ccg +++ b/gio/src/proxyresolver.ccg @@ -43,7 +43,7 @@ void ProxyResolver::lookup_async(const Glib::ustring& uri, const SlotAsyncReady& // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_proxy_resolver_lookup_async(gobj(), uri.c_str(), @@ -57,7 +57,7 @@ void ProxyResolver::lookup_async(const Glib::ustring& uri, const SlotAsyncReady& // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_proxy_resolver_lookup_async(gobj(), uri.c_str(), diff --git a/gio/src/resolver.ccg b/gio/src/resolver.ccg index 2f5f6948..0c5f9592 100644 --- a/gio/src/resolver.ccg +++ b/gio/src/resolver.ccg @@ -39,7 +39,7 @@ Resolver::lookup_by_name_async(const Glib::ustring& hostname, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable) { - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_resolver_lookup_by_name_async (gobj(), hostname.c_str(), @@ -52,7 +52,7 @@ void Resolver::lookup_by_name_async(const Glib::ustring& hostname, const SlotAsyncReady& slot) { - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_resolver_lookup_by_name_async (gobj(), hostname.c_str(), @@ -66,7 +66,7 @@ Resolver::lookup_by_address_async(const Glib::RefPtr<InetAddress>& address, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable) { - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_resolver_lookup_by_address_async (gobj(), Glib::unwrap(address), @@ -79,7 +79,7 @@ void Resolver::lookup_by_address_async(const Glib::RefPtr<InetAddress>& address, const SlotAsyncReady& slot) { - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_resolver_lookup_by_address_async (gobj(), Glib::unwrap(address), @@ -95,7 +95,7 @@ Resolver::lookup_service_async(const Glib::ustring& service, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable) { - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_resolver_lookup_service_async (gobj(), service.c_str(), @@ -112,7 +112,7 @@ Resolver::lookup_service_async(const Glib::ustring& service, const Glib::ustring& domain, const SlotAsyncReady& slot) { - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_resolver_lookup_service_async (gobj(), service.c_str(), @@ -129,7 +129,7 @@ Resolver::lookup_records_async(const Glib::ustring& rrname, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable) { - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_resolver_lookup_records_async(gobj(), (rrname.empty() ? 0 : rrname.c_str()), @@ -144,7 +144,7 @@ Resolver::lookup_records_async(const Glib::ustring& rrname, ResolverRecordType record_type, const SlotAsyncReady& slot) { - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_resolver_lookup_records_async(gobj(), (rrname.empty() ? 0 : rrname.c_str()), diff --git a/gio/src/settings.ccg b/gio/src/settings.ccg index 03e48075..98b6ccd4 100644 --- a/gio/src/settings.ccg +++ b/gio/src/settings.ccg @@ -24,7 +24,7 @@ namespace Gio void Settings::get_value(const Glib::ustring& key, Glib::VariantBase& value) const { - GVariant* const g_value = g_settings_get_value(const_cast<GSettings*>(gobj()), key.c_str()); + const auto g_value = g_settings_get_value(const_cast<GSettings*>(gobj()), key.c_str()); if(!g_value) return; @@ -33,7 +33,7 @@ void Settings::get_value(const Glib::ustring& key, Glib::VariantBase& value) con bool Settings::get_user_value(const Glib::ustring& key, Glib::VariantBase& value) const { - GVariant* const g_value = g_settings_get_user_value(const_cast<GSettings*>(gobj()), key.c_str()); + const auto g_value = g_settings_get_user_value(const_cast<GSettings*>(gobj()), key.c_str()); if(!g_value) return false; @@ -43,7 +43,7 @@ bool Settings::get_user_value(const Glib::ustring& key, Glib::VariantBase& value void Settings::get_default_value(const Glib::ustring& key, Glib::VariantBase& value) const { - GVariant* const g_value = g_settings_get_default_value(const_cast<GSettings*>(gobj()), key.c_str()); + const auto g_value = g_settings_get_default_value(const_cast<GSettings*>(gobj()), key.c_str()); if(!g_value) return; diff --git a/gio/src/socket.ccg b/gio/src/socket.ccg index 7a4a211d..107493f5 100644 --- a/gio/src/socket.ccg +++ b/gio/src/socket.ccg @@ -58,7 +58,7 @@ gssize Socket::receive_from(Glib::RefPtr<SocketAddress>& address, char* buffer, { GError* gerror = 0; GSocketAddress* caddr = 0; - gssize retvalue = g_socket_receive_from(gobj(), &caddr, buffer, size, const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)); + auto retvalue = g_socket_receive_from(gobj(), &caddr, buffer, size, const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)); if(gerror) ::Glib::Error::throw_exception(gerror); @@ -72,7 +72,7 @@ gssize Socket::receive_from(Glib::RefPtr<SocketAddress>& address, char* buffer, { GError* gerror = 0; GSocketAddress* caddr = 0; - gssize retvalue = g_socket_receive_from(gobj(), &caddr, buffer, size, 0, &(gerror)); + auto retvalue = g_socket_receive_from(gobj(), &caddr, buffer, size, 0, &(gerror)); if(gerror) ::Glib::Error::throw_exception(gerror); @@ -86,7 +86,7 @@ gssize Socket::receive_with_blocking(gchar* buffer, gsize size, bool blocking, const Glib::RefPtr<Cancellable>& cancellable) { GError* gerror = 0; - gssize const retvalue = g_socket_receive_with_blocking(gobj(), buffer, size, + const auto retvalue = g_socket_receive_with_blocking(gobj(), buffer, size, blocking, Glib::unwrap(cancellable), &(gerror)); if(gerror) ::Glib::Error::throw_exception(gerror); @@ -98,7 +98,7 @@ gssize Socket::send_with_blocking(gchar* buffer, gsize size, bool blocking, const Glib::RefPtr<Cancellable>& cancellable) { GError* gerror = 0; - gssize const retvalue = g_socket_send_with_blocking(gobj(), buffer, size, + const auto retvalue = g_socket_send_with_blocking(gobj(), buffer, size, blocking, Glib::unwrap(cancellable), &(gerror)); if(gerror) ::Glib::Error::throw_exception(gerror); diff --git a/gio/src/socketaddressenumerator.ccg b/gio/src/socketaddressenumerator.ccg index b783ec8a..d7aca9b6 100644 --- a/gio/src/socketaddressenumerator.ccg +++ b/gio/src/socketaddressenumerator.ccg @@ -31,7 +31,7 @@ namespace Gio { // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_socket_address_enumerator_next_async(gobj(), Glib::unwrap(cancellable), diff --git a/gio/src/socketclient.ccg b/gio/src/socketclient.ccg index ec970358..6448c219 100644 --- a/gio/src/socketclient.ccg +++ b/gio/src/socketclient.ccg @@ -32,7 +32,7 @@ SocketClient::connect_async(const Glib::RefPtr<SocketConnectable>& connectable, // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_socket_client_connect_async (gobj(), connectable->gobj (), @@ -48,7 +48,7 @@ SocketClient::connect_async(const Glib::RefPtr<SocketConnectable>& connectable, // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_socket_client_connect_async (gobj(), connectable->gobj (), @@ -66,7 +66,7 @@ SocketClient::connect_to_host_async(const Glib::ustring& host_and_port, // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_socket_client_connect_to_host_async (gobj(), host_and_port.c_str (), @@ -84,7 +84,7 @@ SocketClient::connect_to_host_async(const Glib::ustring& host_and_port, // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_socket_client_connect_to_host_async (gobj(), host_and_port.c_str (), @@ -103,7 +103,7 @@ SocketClient::connect_to_service_async(const Glib::ustring& domain, // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_socket_client_connect_to_service_async (gobj(), domain.c_str (), @@ -121,7 +121,7 @@ SocketClient::connect_to_service_async(const Glib::ustring& domain, // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_socket_client_connect_to_service_async (gobj(), domain.c_str (), @@ -139,7 +139,7 @@ SocketClient::connect_to_uri_async(const Glib::ustring& uri, guint16 default_por // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_socket_client_connect_to_uri_async (gobj(), uri.c_str(), default_port, @@ -155,7 +155,7 @@ SocketClient::connect_to_uri_async(const Glib::ustring& uri, guint16 default_por // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_socket_client_connect_to_uri_async (gobj(), uri.c_str(), default_port, diff --git a/gio/src/socketconnection.ccg b/gio/src/socketconnection.ccg index 8bd85788..79094c16 100644 --- a/gio/src/socketconnection.ccg +++ b/gio/src/socketconnection.ccg @@ -28,7 +28,7 @@ SocketConnection::connect_async(const Glib::RefPtr<SocketAddress>& address, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable) { - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_socket_connection_connect_async(gobj(), Glib::unwrap(address), @@ -41,7 +41,7 @@ void SocketConnection::connect_async(const Glib::RefPtr<SocketAddress>& address, const SlotAsyncReady& slot) { - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_socket_connection_connect_async(gobj(), Glib::unwrap(address), diff --git a/gio/src/socketlistener.ccg b/gio/src/socketlistener.ccg index b55c6055..75552e47 100644 --- a/gio/src/socketlistener.ccg +++ b/gio/src/socketlistener.ccg @@ -93,7 +93,7 @@ bool SocketListener::add_inet_port(guint16 port) guint16 SocketListener::add_any_inet_port() { GError* gerror = 0; - const guint16 retvalue = g_socket_listener_add_any_inet_port(gobj(), 0, &gerror); + const auto retvalue = g_socket_listener_add_any_inet_port(gobj(), 0, &gerror); if(gerror) ::Glib::Error::throw_exception(gerror); @@ -105,7 +105,7 @@ Glib::RefPtr<Socket> SocketListener::accept_socket(Glib::RefPtr<Glib::Object>& s { GError* gerror = 0; GObject *retobj = 0; - GSocket* retvalue = g_socket_listener_accept_socket(gobj(), + auto retvalue = g_socket_listener_accept_socket(gobj(), &retobj, Glib::unwrap(cancellable), &gerror); @@ -122,7 +122,7 @@ Glib::RefPtr<Socket> SocketListener::accept_socket(Glib::RefPtr<Glib::Object>& s { GError* gerror = 0; GObject *retobj = 0; - GSocket* retvalue = g_socket_listener_accept_socket(gobj(), + auto retvalue = g_socket_listener_accept_socket(gobj(), &retobj, 0, &gerror); @@ -138,7 +138,7 @@ Glib::RefPtr<Socket> SocketListener::accept_socket(Glib::RefPtr<Glib::Object>& s Glib::RefPtr<Socket> SocketListener::accept_socket(const Glib::RefPtr<Cancellable>& cancellable) { GError* gerror = 0; - GSocket* retvalue = g_socket_listener_accept_socket(gobj(), + auto retvalue = g_socket_listener_accept_socket(gobj(), 0, Glib::unwrap(cancellable), &gerror); @@ -151,7 +151,7 @@ Glib::RefPtr<Socket> SocketListener::accept_socket(const Glib::RefPtr<Cancellabl Glib::RefPtr<Socket> SocketListener::accept_socket() { GError* gerror = 0; - GSocket* retvalue = g_socket_listener_accept_socket(gobj(), + auto retvalue = g_socket_listener_accept_socket(gobj(), 0, 0, &gerror); @@ -167,7 +167,7 @@ void SocketListener::accept_socket_async(const Glib::RefPtr<Cancellable>& cancel // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_socket_listener_accept_socket_async(gobj(), Glib::unwrap(cancellable), @@ -180,7 +180,7 @@ void SocketListener::accept_socket_async(const SlotAsyncReady& slot) // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_socket_listener_accept_socket_async(gobj(), 0, @@ -192,7 +192,7 @@ Glib::RefPtr<Socket> SocketListener::accept_socket_finish(const Glib::RefPtr<Asy { GError* gerror = 0; GObject *retobj = 0; - GSocket* retvalue = g_socket_listener_accept_socket_finish(gobj(), + auto retvalue = g_socket_listener_accept_socket_finish(gobj(), Glib::unwrap(result), &retobj, &gerror); @@ -207,7 +207,7 @@ Glib::RefPtr<Socket> SocketListener::accept_socket_finish(const Glib::RefPtr<Asy Glib::RefPtr<Socket> SocketListener::accept_socket_finish(const Glib::RefPtr<AsyncResult>& result) { GError* gerror = 0; - GSocket* retvalue = g_socket_listener_accept_socket_finish(gobj(), + auto retvalue = g_socket_listener_accept_socket_finish(gobj(), Glib::unwrap(result), 0, &gerror); @@ -222,7 +222,7 @@ Glib::RefPtr<SocketConnection> SocketListener::accept(Glib::RefPtr<Object>& sour { GError* gerror = 0; GObject *retobj = 0; - GSocketConnection* retvalue = g_socket_listener_accept(gobj(), + auto retvalue = g_socket_listener_accept(gobj(), &retobj, Glib::unwrap(cancellable), &gerror); @@ -239,7 +239,7 @@ Glib::RefPtr<SocketConnection> SocketListener::accept(Glib::RefPtr<Object>& sour { GError* gerror = 0; GObject *retobj = 0; - GSocketConnection* retvalue = g_socket_listener_accept(gobj(), + auto retvalue = g_socket_listener_accept(gobj(), &retobj, 0, &gerror); @@ -255,7 +255,7 @@ Glib::RefPtr<SocketConnection> SocketListener::accept(Glib::RefPtr<Object>& sour Glib::RefPtr<SocketConnection> SocketListener::accept(const Glib::RefPtr<Cancellable>& cancellable) { GError* gerror = 0; - GSocketConnection* retvalue = g_socket_listener_accept(gobj(), + auto retvalue = g_socket_listener_accept(gobj(), 0, Glib::unwrap(cancellable), &gerror); @@ -268,7 +268,7 @@ Glib::RefPtr<SocketConnection> SocketListener::accept(const Glib::RefPtr<Cancell Glib::RefPtr<SocketConnection> SocketListener::accept() { GError* gerror = 0; - GSocketConnection* retvalue = g_socket_listener_accept(gobj(), + auto retvalue = g_socket_listener_accept(gobj(), 0, 0, &gerror); @@ -284,7 +284,7 @@ void SocketListener::accept_async(const SlotAsyncReady& slot) // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_socket_listener_accept_async(gobj(), 0, @@ -297,7 +297,7 @@ void SocketListener::accept_async(const Glib::RefPtr<Cancellable>& cancellable, // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_socket_listener_accept_async(gobj(), Glib::unwrap(cancellable), @@ -309,7 +309,7 @@ Glib::RefPtr<SocketConnection> SocketListener::accept_finish(const Glib::RefPtr< { GError* gerror = 0; GObject *retobj = 0; - GSocketConnection* retvalue = g_socket_listener_accept_finish(gobj(), + auto retvalue = g_socket_listener_accept_finish(gobj(), Glib::unwrap(result), &retobj, &gerror); @@ -324,7 +324,7 @@ Glib::RefPtr<SocketConnection> SocketListener::accept_finish(const Glib::RefPtr< Glib::RefPtr<SocketConnection> SocketListener::accept_finish(const Glib::RefPtr<AsyncResult>& result) { GError* gerror = 0; - GSocketConnection* retvalue = g_socket_listener_accept_finish(gobj(), + auto retvalue = g_socket_listener_accept_finish(gobj(), Glib::unwrap(result), 0, &gerror); diff --git a/gio/src/unixconnection.ccg b/gio/src/unixconnection.ccg index 2341973a..bddc9696 100644 --- a/gio/src/unixconnection.ccg +++ b/gio/src/unixconnection.ccg @@ -27,7 +27,7 @@ namespace Gio void UnixConnection::receive_credentials_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable) { - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_unix_connection_receive_credentials_async(gobj(), Glib::unwrap(cancellable), @@ -37,7 +37,7 @@ void UnixConnection::receive_credentials_async(const SlotAsyncReady& slot, void UnixConnection::receive_credentials_async(const SlotAsyncReady& slot) { - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_unix_connection_receive_credentials_async(gobj(), 0, @@ -49,7 +49,7 @@ void UnixConnection::send_credentials_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable) { - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_unix_connection_send_credentials_async(gobj(), Glib::unwrap(cancellable), @@ -61,7 +61,7 @@ void UnixConnection::send_credentials_async(const SlotAsyncReady& slot) { - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_unix_connection_send_credentials_async(gobj(), 0, diff --git a/gio/src/unixfdlist.ccg b/gio/src/unixfdlist.ccg index aa26c9c6..b17b0f6d 100644 --- a/gio/src/unixfdlist.ccg +++ b/gio/src/unixfdlist.ccg @@ -50,7 +50,7 @@ UnixFDList::UnixFDList(const Glib::ArrayHandle<int>& fds, int n_fds) const Glib::ArrayHandle<int> UnixFDList::peek_fds() const { int length = 0; - const int* fds = g_unix_fd_list_peek_fds(const_cast<GUnixFDList*>(gobj()), &length); + const auto fds = g_unix_fd_list_peek_fds(const_cast<GUnixFDList*>(gobj()), &length); // The array is terminated with a -1, but that terminating element is // not included in the length that g_unix_fd_list_peek_fds() returns. return Glib::ArrayHandle<int>(fds, length, Glib::OWNERSHIP_NONE); @@ -59,7 +59,7 @@ const Glib::ArrayHandle<int> UnixFDList::peek_fds() const Glib::ArrayHandle<int> UnixFDList::steal_fds() { int length = 0; - const int* fds = g_unix_fd_list_steal_fds(gobj(), &length); + const auto fds = g_unix_fd_list_steal_fds(gobj(), &length); // The array is terminated with a -1, but that terminating element is // not included in the length that g_unix_fd_list_steal_fds() returns. return Glib::ArrayHandle<int>(fds, length, Glib::OWNERSHIP_DEEP); diff --git a/gio/src/unixfdmessage.ccg b/gio/src/unixfdmessage.ccg index d112bb65..7849a208 100644 --- a/gio/src/unixfdmessage.ccg +++ b/gio/src/unixfdmessage.ccg @@ -25,7 +25,7 @@ namespace Gio Glib::ArrayHandle<int> UnixFDMessage::steal_fds() { int length = 0; - const int* fds = g_unix_fd_message_steal_fds(gobj(), &length); + const auto fds = g_unix_fd_message_steal_fds(gobj(), &length); // The array is terminated with a -1, but that terminating element is // not included in the length that g_unix_fd_message_steal_fds() returns. return Glib::ArrayHandle<int>(fds, length, Glib::OWNERSHIP_DEEP); diff --git a/gio/src/volume.ccg b/gio/src/volume.ccg index d06790a8..0bffbcb6 100644 --- a/gio/src/volume.ccg +++ b/gio/src/volume.ccg @@ -33,7 +33,7 @@ Volume::mount(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsy // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_volume_mount(gobj(), static_cast<GMountMountFlags>(flags), @@ -50,7 +50,7 @@ Volume::mount(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsy // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_volume_mount(gobj(), static_cast<GMountMountFlags>(flags), @@ -88,7 +88,7 @@ void Volume::eject(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_volume_eject_with_operation(gobj(), static_cast<GMountUnmountFlags>(flags), @@ -103,7 +103,7 @@ void Volume::eject(const SlotAsyncReady& slot, MountUnmountFlags flags) // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_volume_eject_with_operation(gobj(), static_cast<GMountUnmountFlags>(flags), @@ -128,7 +128,7 @@ void Volume::eject(const Glib::RefPtr<MountOperation>& mount_operation, const Sl // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_volume_eject_with_operation(gobj(), static_cast<GMountUnmountFlags>(flags), @@ -143,7 +143,7 @@ void Volume::eject(const Glib::RefPtr<MountOperation>& mount_operation, const Sl // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter // and deleted in the callback. - SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + auto slot_copy = new SlotAsyncReady(slot); g_volume_eject_with_operation(gobj(), static_cast<GMountUnmountFlags>(flags), |