From: dooglus Date: Thu, 6 Sep 2007 11:26:20 +0000 (+0000) Subject: Added a new member "bool same_type_as(const Type testtype)const". X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=2cd9008c7de44187fe5f7caded1a3050d223a3ae;p=synfig.git Added a new member "bool same_type_as(const Type testtype)const". git-svn-id: http://svn.voria.com/code@609 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/synfig/value.h b/synfig-core/trunk/src/synfig/value.h index 53dc12a..3e843a6 100644 --- a/synfig-core/trunk/src/synfig/value.h +++ b/synfig-core/trunk/src/synfig/value.h @@ -204,6 +204,11 @@ public: { const Type testtype(get_type(x)); + return same_type_as(testtype); + } + + bool same_type_as(const Type testtype)const + { if(testtype==type)return true; if( (type==TYPE_REAL || type==TYPE_TIME) && (testtype==TYPE_REAL || testtype==TYPE_TIME) )