diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-07 17:06:45 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-07 17:36:54 -0800 |
commit | a0a43046b3b21853fdec115dd35f1def9c312670 (patch) | |
tree | db3e668d3da07dbe1a146ff06edb789da42cab03 /input.cpp | |
parent | e8af86017a4b072a9b03d914e34c24e387dac3f3 (diff) |
Removed discriminated union from block_t type, allowing us to store wcstrings in it
Diffstat (limited to 'input.cpp')
-rw-r--r-- | input.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -816,14 +816,14 @@ bool input_terminfo_get_name( const wcstring &seq, wcstring &name ) return false; } -void input_terminfo_get_names( array_list_t *lst, int skip_null ) +wcstring_list_t input_terminfo_get_names( bool skip_null ) { - int i; - - CHECK( lst, ); + wcstring_list_t result; + result.reserve(al_get_count(terminfo_mappings)); + input_init(); - for( i=0; i<al_get_count( terminfo_mappings ); i++ ) + for( int i=0; i<al_get_count( terminfo_mappings ); i++ ) { terminfo_mapping_t *m = (terminfo_mapping_t *)al_get( terminfo_mappings, i ); @@ -831,8 +831,9 @@ void input_terminfo_get_names( array_list_t *lst, int skip_null ) { continue; } - al_push( lst, m->name ); + result.push_back(wcstring(m->name)); } + return result; } wcstring_list_t input_function_get_names( void ) |