Hi Noel,

On 29.02.2012 15:24, Noel Grandin wrote:
New patch with recommended fixes attached.

Great! Pushed, thanks.

I wonder, would it not be better to convert this type of listener-list
thing to boost::ptr_set?
- no chance of accidentally adding duplicates

Objects are created right before push_back, so I think the code is safe as it is.

- O(1) deletion

...and not-so-fast insertion. IMHO listeners are inserted more often then removed. But you can disagree, of course. :)

Anyway, there is another improvement now - convert these size() to empty():

    sal_uInt16 nCount = aMouseClickHandlers.size();
    ...
    if (aMouseClickHandlers.size() == 1 && nCount == 0)


Thanks again,
Ivan


_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to