Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


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



Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.