comparison src/styleengine.hh @ 631:4c9f7f03caf0

fix DocTree implementation in StyleEngine
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Mon, 01 Dec 2008 19:01:45 +0100
parents d0694361ecd0
children eb0279297fde
comparison
equal deleted inserted replaced
630:8995fb3d70b7 631:4c9f7f03caf0
30 inline const DoctreeNode *top () { 30 inline const DoctreeNode *top () {
31 return stack->getRef (stack->size () - 1); 31 return stack->getRef (stack->size () - 1);
32 }; 32 };
33 33
34 inline const DoctreeNode *parent (const DoctreeNode *n) { 34 inline const DoctreeNode *parent (const DoctreeNode *n) {
35 if (n->depth > 0) 35 if (n->depth > 1)
36 return stack->getRef (n->depth - 1); 36 return stack->getRef (n->depth - 1);
37 else 37 else
38 return NULL; 38 return NULL;
39 }; 39 };
40 40