diff options
author | Bram Moolenaar <Bram@vim.org> | 2015-07-17 13:22:51 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2015-07-17 13:22:51 +0200 |
commit | 2536d4f396680f079e2cb96f9787a434846b5ce7 (patch) | |
tree | 0f7a7d0a8d1b24aef3970a03252346c875a8c005 /src/misc2.c | |
parent | 5d1bc78a2b9fbe3e3112afcde7c80eb19d5989f4 (diff) | |
download | vim-git-2536d4f396680f079e2cb96f9787a434846b5ce7.tar.gz |
patch 7.4.783v7.4.783
Problem: copy_chars() and copy_spaces() are inefficient.
Solution: Use memset() instead. (Dominique Pelle)
Diffstat (limited to 'src/misc2.c')
-rw-r--r-- | src/misc2.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/misc2.c b/src/misc2.c index 5aca2027b..79bc37991 100644 --- 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 |