mirror of
https://github.com/git/git.git
synced 2024-05-12 15:16:09 +02:00
string_list: remove string_list_insert_at_index() from its API
There no longer is a caller to this function. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
63226218ba
commit
f8c4ab611a
|
@ -59,13 +59,7 @@ static int add_entry(int insert_at, struct string_list *list, const char *string
|
||||||
|
|
||||||
struct string_list_item *string_list_insert(struct string_list *list, const char *string)
|
struct string_list_item *string_list_insert(struct string_list *list, const char *string)
|
||||||
{
|
{
|
||||||
return string_list_insert_at_index(list, -1, string);
|
int index = add_entry(-1, list, string);
|
||||||
}
|
|
||||||
|
|
||||||
struct string_list_item *string_list_insert_at_index(struct string_list *list,
|
|
||||||
int insert_at, const char *string)
|
|
||||||
{
|
|
||||||
int index = add_entry(insert_at, list, string);
|
|
||||||
|
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
index = -1 - index;
|
index = -1 - index;
|
||||||
|
|
|
@ -61,8 +61,6 @@ int string_list_find_insert_index(const struct string_list *list, const char *st
|
||||||
* Returns the string_list_item, the string is part of.
|
* Returns the string_list_item, the string is part of.
|
||||||
*/
|
*/
|
||||||
struct string_list_item *string_list_insert(struct string_list *list, const char *string);
|
struct string_list_item *string_list_insert(struct string_list *list, const char *string);
|
||||||
struct string_list_item *string_list_insert_at_index(struct string_list *list,
|
|
||||||
int insert_at, const char *string);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Checks if the given string is part of a sorted list. If it is part of the list,
|
* Checks if the given string is part of a sorted list. If it is part of the list,
|
||||||
|
|
Loading…
Reference in New Issue