Isolated algorithmic improvements.
* Fix inefficient STL use around Parser::UTF8Parser. * Reduce typeid() usage, change some of it to a virtual method * Do multiple-line scrolls as a single move
This commit is contained in:
@@ -46,16 +46,17 @@ string Complete::act( const string &str )
|
||||
{
|
||||
for ( unsigned int i = 0; i < str.size(); i++ ) {
|
||||
/* parse octet into up to three actions */
|
||||
list<Action *> actions( parser.input( str[ i ] ) );
|
||||
parser.input( str[ i ], actions );
|
||||
|
||||
/* apply actions to terminal and delete them */
|
||||
for ( list<Action *>::iterator it = actions.begin();
|
||||
for ( Actions::iterator it = actions.begin();
|
||||
it != actions.end();
|
||||
it++ ) {
|
||||
Action *act = *it;
|
||||
act->act_on_terminal( &terminal );
|
||||
delete act;
|
||||
}
|
||||
actions.clear();
|
||||
}
|
||||
|
||||
return terminal.read_octets_to_host();
|
||||
|
||||
Reference in New Issue
Block a user