Mercurial > vim
diff src/misc2.c @ 6929:e55929fca0cf v7.4.783
patch 7.4.783
Problem: copy_chars() and copy_spaces() are inefficient.
Solution: Use memset() instead. (Dominique Pelle)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 17 Jul 2015 13:22:51 +0200 |
parents | 58d9f967ae1a |
children | 7758d6245c3a |
line wrap: on
line diff
--- a/src/misc2.c +++ b/src/misc2.c @@ -1600,40 +1600,6 @@ strup_save(orig) #endif /* - * copy a space a number of times - */ - void -copy_spaces(ptr, count) - char_u *ptr; - size_t count; -{ - size_t i = count; - char_u *p = ptr; - - while (i--) - *p++ = ' '; -} - -#if defined(FEAT_VISUALEXTRA) || defined(PROTO) -/* - * Copy a character a number of times. - * Does not work for multi-byte characters! - */ - void -copy_chars(ptr, count, c) - char_u *ptr; - size_t count; - int c; -{ - size_t i = count; - char_u *p = ptr; - - while (i--) - *p++ = c; -} -#endif - -/* * delete spaces at the end of a string */ void