Don't use 'this' as a variable name as it confuses c++
This commit is contained in:
parent
cffbaa6c4e
commit
44e575845f
@ -121,30 +121,30 @@ char **rc_strlist_delete (char **list, const char *item)
|
|||||||
}
|
}
|
||||||
librc_hidden_def(rc_strlist_delete)
|
librc_hidden_def(rc_strlist_delete)
|
||||||
|
|
||||||
char **rc_strlist_join (char **this, char **that)
|
char **rc_strlist_join (char **list1, char **list2)
|
||||||
{
|
{
|
||||||
char **newlist;
|
char **newlist;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int j = 0;
|
int j = 0;
|
||||||
|
|
||||||
if (! this && that)
|
if (! list1 && list2)
|
||||||
return (that);
|
return (list2);
|
||||||
if (! that && this)
|
if (! list2 && list1)
|
||||||
return (this);
|
return (list1);
|
||||||
if (! that && ! this)
|
if (! list1 && ! list2)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
|
||||||
while (this[i])
|
while (list1[i])
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
while (that[j])
|
while (list2[j])
|
||||||
j++;
|
j++;
|
||||||
|
|
||||||
newlist = rc_xrealloc (this, sizeof (char *) * (i + j + 1));
|
newlist = rc_xrealloc (list1, sizeof (char *) * (i + j + 1));
|
||||||
|
|
||||||
j = 0;
|
j = 0;
|
||||||
while (that[j]) {
|
while (list2[j]) {
|
||||||
newlist[i] = that[j];
|
newlist[i] = list2[j];
|
||||||
i++;
|
i++;
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
|
2
src/rc.h
2
src/rc.h
@ -204,7 +204,7 @@ char **rc_strlist_addsort (char **list, const char *item);
|
|||||||
char **rc_strlist_addsortc (char **list, const char *item);
|
char **rc_strlist_addsortc (char **list, const char *item);
|
||||||
char **rc_strlist_addsortu (char **list, const char *item);
|
char **rc_strlist_addsortu (char **list, const char *item);
|
||||||
char **rc_strlist_delete (char **list, const char *item);
|
char **rc_strlist_delete (char **list, const char *item);
|
||||||
char **rc_strlist_join (char **this, char **that);
|
char **rc_strlist_join (char **list1, char **list2);
|
||||||
void rc_strlist_reverse (char **list);
|
void rc_strlist_reverse (char **list);
|
||||||
void rc_strlist_free (char **list);
|
void rc_strlist_free (char **list);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user