From 3ee74723bfff8517c317ce1dc7adde61baaf2e7d Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Sun, 17 Feb 2013 18:39:03 +0100 Subject: [PATCH] Remove casts to GModelPointSource, GModelExtendedSource and GModelDiffuseSource. --- pyext/GModels.i | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/pyext/GModels.i b/pyext/GModels.i index 3bece81..7e3df65 100644 --- a/pyext/GModels.i +++ b/pyext/GModels.i @@ -1,7 +1,7 @@ /*************************************************************************** * GModels.i - Model container class * * ----------------------------------------------------------------------- * - * copyright (C) 2009-2012 by Juergen Knoedlseder * + * copyright (C) 2009-2013 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -29,26 +29,12 @@ #include "GModel.hpp" #include "GModelSky.hpp" #include "GModelData.hpp" -#include "GModelDiffuseSource.hpp" -#include "GModelExtendedSource.hpp" -#include "GModelPointSource.hpp" %} /* __ Typemaps ___________________________________________________________ */ %typemap(out) GModel* { if (dynamic_cast($1) != NULL) { - if (dynamic_cast($1) != NULL) { - $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), SWIGTYPE_p_GModelDiffuseSource, 0 | 0 ); - } - else if (dynamic_cast($1) != NULL) { - $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), SWIGTYPE_p_GModelExtendedSource, 0 | 0 ); - } - else if (dynamic_cast($1) != NULL) { - $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), SWIGTYPE_p_GModelPointSource, 0 | 0 ); - } - else { - $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), SWIGTYPE_p_GModelSky, 0 | 0 ); - } + $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), SWIGTYPE_p_GModelSky, 0 | 0 ); } else if (dynamic_cast($1) != NULL) { $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), SWIGTYPE_p_GModelData, 0 | 0 ); -- libgit2 0.21.4