From 9211cbcd3d580cf96a2bea7d8dd3ec8beefca9a7 Mon Sep 17 00:00:00 2001 From: Peng Huang Date: Sun, 30 May 2010 21:04:22 +0800 Subject: Refine coding style --- src/Object.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/Object.h') diff --git a/src/Object.h b/src/Object.h index 9ecaedc..a30ac9c 100644 --- a/src/Object.h +++ b/src/Object.h @@ -29,16 +29,19 @@ namespace PY { class Object { protected: template - Object (T *p) : m_p ((GObject *)p) { + Object (T *p) : m_p ((GObject *)p) + { g_assert (get () != NULL); } - operator GObject * (void) const { + operator GObject * (void) const + { return m_p; } template - T * get (void) const { + T * get (void) const + { return (T *) (GObject *) m_p; } -- cgit