It will be nice to define gkLogicTree::createNode as a template method.
This will avoid to update the big switch (in the cpp) every time we create
a new node.
This is my proposal. Change gkLogicTree::createNode in the header file for
the following code (and remove cpp implementation):
template<class T>
T* createNode()
{
T* pNode = new T(this, m_uniqueHandle);
GK_ASSERT(pNode);
if(m_object) pNode->attachObject(m_object);
m_nodes.push_back(pNode);
m_uniqueHandle ++;
return pNode;
}
Original issue reported on code.google.com by silveira.nestor@gmail.com on 16 Feb 2010 at 10:49
Original issue reported on code.google.com by
silveira.nestor@gmail.com
on 16 Feb 2010 at 10:49