[glibmm] Value: Remove the CType alias.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Value: Remove the CType alias.
- Date: Sun, 9 Apr 2017 12:33:03 +0000 (UTC)
commit b5bfd79ab38bcf2794f5255d19a18d61638668af
Author: Murray Cumming <murrayc murrayc com>
Date: Sun Apr 9 10:45:07 2017 +0200
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.
glib/glibmm/value.h | 8 +-------
glib/glibmm/value_custom.h | 2 --
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 f4ef49f..9afc426 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 d3ebfee..98e8a0f 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 e4b5885..56097ac 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]