On 12/02/2010 03:27 PM, Vincent van Ravesteijn wrote:
- /// Call then when existing things like footnotes.
+ /// Call this when existing things like footnotes.
void restoreLastLayout() { layout_stack_.pop_back(); }
exiting ?
Besides, why are counter_stack_ and layout_stack_ deque's ?
/// Used to keep track of active counters.
std::deque<docstring> counter_stack_;
/// Same, but for last layout.
std::deque<Layout const *> layout_stack_;
1. I had to look up what a deque is,
One of the few things I remember from my data structures class a
millenium ago....
2. It is the same as a vector (especially as we use it),
3. we already use vector in this class, so why adding an useless
#include<deque> ?
I read somewhere that stacks are best implemented as deques. Don't ask
me why now,
but I think they are slightly cheaper. (I'm sure Andre would have a view
about this.) In
fact, the use we are making of vector there doesn't require a vector,
but could be a deque,
so I'll change that, too.
Richard