diff options
author | Murray Cumming <murrayc@murrayc.com> | 2017-04-09 10:45:07 +0200 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2017-04-09 14:24:57 +0200 |
commit | b5bfd79ab38bcf2794f5255d19a18d61638668af (patch) | |
tree | a6cd04a41e09ca845521fd2929b6e5627bc97eea | |
parent | b98b57b647c4475031b17c793336b490900198bc (diff) | |
download | glibmm-b5bfd79ab38bcf2794f5255d19a18d61638668af.tar.gz |
Value: Remove the CType alias.
This should not be necessary. Anything that uses it could hopefully
use auto instead.
This avoids the problem of the Value<RefPtr> specialization assuming
that the RefPtr holds a Glib::ObjectBase-derived typed.
-rw-r--r-- | glib/glibmm/value.h | 8 | ||||
-rw-r--r-- | glib/glibmm/value_custom.h | 2 | ||||
-rw-r--r-- | glib/src/value_basictypes.h.m4 | 1 |
3 files changed, 1 insertions, 10 deletions
diff --git a/glib/glibmm/value.h b/glib/glibmm/value.h index f4ef49f4..9afc4264 100644 --- a/glib/glibmm/value.h +++ b/glib/glibmm/value.h @@ -140,7 +140,6 @@ protected: class ValueBase_Enum : public ValueBase { public: - using CType = gint; static GType value_type() G_GNUC_CONST; #ifndef DOXYGEN_SHOULD_SKIP_THIS @@ -161,7 +160,6 @@ protected: class ValueBase_Flags : public ValueBase { public: - using CType = guint; static GType value_type() G_GNUC_CONST; #ifndef DOXYGEN_SHOULD_SKIP_THIS @@ -182,7 +180,6 @@ protected: class ValueBase_String : public ValueBase { public: - using CType = const gchar*; static GType value_type() G_GNUC_CONST; #ifndef DOXYGEN_SHOULD_SKIP_THIS @@ -216,12 +213,11 @@ class Value_Boxed : public ValueBase_Boxed { public: using CppType = T; - using CType = typename T::BaseObjectType*; static GType value_type() { return T::get_type(); } void set(const CppType& data) { set_boxed(data.gobj()); } - CppType get() const { return CppType(static_cast<CType>(get_boxed())); } + CppType get() const { return CppType(static_cast<typename T::BaseObjectType*>(get_boxed())); } }; // More spec-compliant compilers (such as Tru64) need this to be near Glib::Object instead. @@ -235,7 +231,6 @@ class Value<Glib::RefPtr<T>> : public ValueBase_Object { public: using CppType = Glib::RefPtr<T>; - using CType = typename T::BaseObjectType*; static GType value_type() { return T::get_base_type(); } @@ -254,7 +249,6 @@ class Value<Glib::RefPtr<const T>> : public ValueBase_Object { public: using CppType = Glib::RefPtr<const T>; - using CType = typename T::BaseObjectType*; static GType value_type() { return T::get_base_type(); } diff --git a/glib/glibmm/value_custom.h b/glib/glibmm/value_custom.h index d3ebfee0..98e8a0f8 100644 --- a/glib/glibmm/value_custom.h +++ b/glib/glibmm/value_custom.h @@ -62,7 +62,6 @@ class Value_Pointer : public ValueBase_Object { public: using CppType = PtrT; - using CType = void*; static inline GType value_type() G_GNUC_CONST; @@ -101,7 +100,6 @@ class Value : public ValueBase_Boxed { public: using CppType = T; - using CType = T*; static GType value_type() G_GNUC_CONST; diff --git a/glib/src/value_basictypes.h.m4 b/glib/src/value_basictypes.h.m4 index e4b58851..56097ac0 100644 --- a/glib/src/value_basictypes.h.m4 +++ b/glib/src/value_basictypes.h.m4 @@ -34,7 +34,6 @@ class Value<$1> : public ValueBase { public: using CppType = $1; - using CType = g$2; static GType value_type() G_GNUC_CONST; |