gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-commit] gnash ChangeLog server/asobj/Key.cpp server/mov...


From: strk
Subject: Re: [Gnash-commit] gnash ChangeLog server/asobj/Key.cpp server/mov...
Date: Tue, 10 Jul 2007 16:01:47 +0200

On Tue, Jul 10, 2007 at 12:22:34PM +0000, Zou Lunkai wrote:

> +     std::vector<KeyListener> & listeners = _vm.getRoot().getKeyListeners();

Zou, just a minor thing.
I was using a std::set in the old design.
std::set is an ordered container, using a binary tree for seeks.
This helps by making the removeListener() faster.
In general try always using typedefs for the containers. I think
I already provided a KeyListeners typedef in this case.
Using a typedef helps changing the underlying container without
requiring a lot of changes around.
In the KeyListener class case, the std::set should be defined with
a custom comparator, using the wrapped intrusive_ptr for comparison.

--strk; 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]