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:
John Hood
2014-05-10 15:25:40 -04:00
parent 3fa42cb8bb
commit 8fdcdc88cd
11 changed files with 89 additions and 63 deletions
+2 -2
View File
@@ -43,9 +43,9 @@ std::string Action::str( void )
char thechar[ 10 ] = { 0 };
if ( char_present ) {
if ( iswprint( ch ) )
snprintf( thechar, 10, "(%lc)", (wint_t)ch );
snprintf( thechar, 10, "(%lc)", static_cast<wint_t>(ch) );
else
snprintf( thechar, 10, "(0x%x)", (unsigned int)ch );
snprintf( thechar, 10, "(0x%x)", static_cast<unsigned int>(ch) );
}
return name() + std::string( thechar );