mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 15:58:17 +00:00
Refactor after_pathsep() to use const qualified args
This commit is contained in:
@@ -1682,7 +1682,7 @@ void path_fix_case(char_u *name)
|
|||||||
* Takes care of multi-byte characters.
|
* Takes care of multi-byte characters.
|
||||||
* "b" must point to the start of the file name
|
* "b" must point to the start of the file name
|
||||||
*/
|
*/
|
||||||
int after_pathsep(char *b, char *p)
|
int after_pathsep(const char *b, const char *p)
|
||||||
{
|
{
|
||||||
return p > b && vim_ispathsep(p[-1])
|
return p > b && vim_ispathsep(p[-1])
|
||||||
&& (!has_mbyte || (*mb_head_off)((char_u *)b, (char_u *)p - 1) == 0);
|
&& (!has_mbyte || (*mb_head_off)((char_u *)b, (char_u *)p - 1) == 0);
|
||||||
@@ -1761,7 +1761,7 @@ int pathcmp(const char *p, const char *q, int maxlen)
|
|||||||
/* ignore a trailing slash, but not "//" or ":/" */
|
/* ignore a trailing slash, but not "//" or ":/" */
|
||||||
if (c2 == NUL
|
if (c2 == NUL
|
||||||
&& i > 0
|
&& i > 0
|
||||||
&& !after_pathsep((char *)s, (char *)s + i)
|
&& !after_pathsep(s, s + i)
|
||||||
#ifdef BACKSLASH_IN_FILENAME
|
#ifdef BACKSLASH_IN_FILENAME
|
||||||
&& (c1 == '/' || c1 == '\\')
|
&& (c1 == '/' || c1 == '\\')
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user