[atkmm] C++11: Use of auto.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [atkmm] C++11: Use of auto.
- Date: Thu, 19 Jan 2017 07:40:34 +0000 (UTC)
commit 5fbe800d84737b2d3c83c728c23c10df0912e40d
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Dec 9 13:54:57 2016 +0100
C++11: Use of auto.
atk/src/object.ccg | 2 +-
atk/src/relation.ccg | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/atk/src/object.ccg b/atk/src/object.ccg
index 6c3a881..715ead0 100644
--- a/atk/src/object.ccg
+++ b/atk/src/object.ccg
@@ -35,7 +35,7 @@ namespace Atk
* in the following example is doomed to fail:
*
* Gtk::Image image ("icon.png");
- * Glib::RefPtr<Atk::Image> accessible = Glib::RefPtr<Atk::Image>::cast_dynamic(image.get_accessible());
+ * auto accessible = Glib::RefPtr<Atk::Image>::cast_dynamic(image.get_accessible());
* accessible->set_image_description("my icon");
*
* This would segfault, even though the accessible object _does_ implement
diff --git a/atk/src/relation.ccg b/atk/src/relation.ccg
index 16b90b0..9ca26fd 100644
--- a/atk/src/relation.ccg
+++ b/atk/src/relation.ccg
@@ -36,7 +36,7 @@ Relation::Relation(const Glib::ArrayHandle< Glib::RefPtr<Atk::Object> >& targets
Glib::ArrayHandle< Glib::RefPtr<Atk::Object> > Relation::get_target()
{
- GPtrArray *const parray = atk_relation_get_target(gobj());
+ auto* const parray = atk_relation_get_target(gobj());
return Glib::ArrayHandle< Glib::RefPtr<Atk::Object> >
(reinterpret_cast<AtkObject**>(parray->pdata), parray->len, Glib::OWNERSHIP_NONE);
@@ -44,7 +44,7 @@ Glib::ArrayHandle< Glib::RefPtr<Atk::Object> > Relation::get_target()
Glib::ArrayHandle< Glib::RefPtr<const Atk::Object> > Relation::get_target() const
{
- GPtrArray *const parray = atk_relation_get_target(const_cast<AtkRelation*>(gobj()));
+ auto* const parray = atk_relation_get_target(const_cast<AtkRelation*>(gobj()));
return Glib::ArrayHandle< Glib::RefPtr<const Atk::Object> >
(reinterpret_cast<AtkObject**>(parray->pdata), parray->len, Glib::OWNERSHIP_NONE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]