Abdelrazak Younes wrote:
And now that we're not just listing the layouts in the order they were created---they're sorted into categories, or sorted by their title, or whatever. So, anyway, that's what I was trying to change, by using an iterator. But maybe, as you said, there is some other way to do it.

map<name, Layout *> seems like a good solution to me.

Right. And this ought to make access of this kind:
   textclass[layoutname]
faster, too. Right now (and before), it has to search through the vector via find_if, which makes performance linear in the vector case, whereas it should be logarithmic in the map case. (Right?) If so, then even outside the frontend, we should see an improvement, because most access to layouts is via operator[].

rh

Reply via email to