From 09b58ee2465d302977a2dcb4c4e16737fe5d8a2a Mon Sep 17 00:00:00 2001 From: dooglus Date: Thu, 6 Sep 2007 07:52:31 +0000 Subject: [PATCH] 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 --- synfig-core/trunk/src/synfig/valuenode.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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") ); -- 2.7.4