|
From: | zou lunkai |
Subject: | Re: [Gnash-commit] gnash ChangeLog server/asobj/Key.cpp server/aso... |
Date: | Fri, 27 Apr 2007 18:04:16 +0800 |
> std::string funcname = key_event_type.get_function_name(); > + // There is no user defined "onKeyPress" event handler > + if( ( funcname != "onKeyDown") && (funcname != "onKeyUp") ) > + return; > + Just a tought: 1) comparing the event_id would be faster (ints rather then strings) 2) would it be worth to have get_function_name() return empty() for the events that have no corresponding user-defined handler ?
yes, you are right. I will change to compare the event_id.
[Prev in Thread] | Current Thread | [Next in Thread] |