From: dooglus Date: Thu, 6 Sep 2007 07:52:31 +0000 (+0000) Subject: Make the #defines for ADD_VALUENODE and ADD_VALUENODE2 more readable. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=09b58ee2465d302977a2dcb4c4e16737fe5d8a2a;p=synfig.git Make the #defines for ADD_VALUENODE and ADD_VALUENODE2 more readable. git-svn-id: http://svn.voria.com/code@608 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/synfig/valuenode.cpp b/synfig-core/trunk/src/synfig/valuenode.cpp index 95974a5..77b9489 100644 --- a/synfig-core/trunk/src/synfig/valuenode.cpp +++ b/synfig-core/trunk/src/synfig/valuenode.cpp @@ -88,8 +88,15 @@ ValueNode::subsys_init() { book_=new LinkableValueNode::Book(); -#define ADD_VALUENODE(c,n,l) (*book_)[n].factory=reinterpret_cast(&c::create); (*book_)[n].check_type=&c::check_type;(*book_)[n].local_name=l -#define ADD_VALUENODE2(c,n,l) (*book_)[n].factory=reinterpret_cast(&c::create_from); (*book_)[n].check_type=&c::check_type;(*book_)[n].local_name=l +#define ADD_VALUENODE(class,name,local) \ + (*book_)[name].factory=reinterpret_cast(&class::create); \ + (*book_)[name].check_type=&class::check_type; \ + (*book_)[name].local_name=local + +#define ADD_VALUENODE2(class,name,local) \ + (*book_)[name].factory=reinterpret_cast(&class::create_from); \ + (*book_)[name].check_type=&class::check_type; \ + (*book_)[name].local_name=local ADD_VALUENODE(ValueNode_Linear, "linear", _("Linear") ); ADD_VALUENODE(ValueNode_Composite, "composite", _("Composite") );