diff options
author | axel <axel@liljencrantz.se> | 2006-02-05 23:13:35 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2006-02-05 23:13:35 +1000 |
commit | 8e05c8bee89cd0ceb93025b67a202070251d092c (patch) | |
tree | 546bc3a08aef69ee692ac69d56523388993fe2e3 /util.c | |
parent | 0fa3c15114be3b6bfbd32b53e9621431dbe13632 (diff) |
Tiny performance tweaks
darcs-hash:20060205131335-ac50b-5b1895d50334dfe9e375ab60e723d1b62b712707.gz
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -907,19 +907,16 @@ void sb_append_substring( string_buffer_t *b, const wchar_t *s, size_t l ) void sb_append_char( string_buffer_t *b, wchar_t c ) { - wchar_t buff[2]= - { - c, 0 - } - ; + wchar_t tmp=0; if( !b ) { return; } - sb_append( b, buff ); - + b_append( b, &c, sizeof(wchar_t) ); + b_append( b, &tmp, sizeof(wchar_t) ); + b->used -= sizeof(wchar_t); } void sb_append2( string_buffer_t *b, ... ) |