remove index because it's literally the same as comparisons
This commit is contained in:
parent
73b5777b88
commit
25c4656a51
2 changed files with 0 additions and 3 deletions
|
@ -17,7 +17,6 @@ typedef struct {
|
|||
|
||||
typedef struct {
|
||||
bool success;
|
||||
size_t index;
|
||||
size_t comparisons;
|
||||
} SearchResult;
|
||||
|
||||
|
|
|
@ -64,7 +64,6 @@ LinkedList linked_list_merge(LinkedList l1, LinkedList l2) {
|
|||
SearchResult linked_list_search(LinkedList l, void *value, int (*compare_values)(void *v1, void *v2)) {
|
||||
SearchResult result;
|
||||
result.comparisons = 0;
|
||||
result.index = 0;
|
||||
result.success = false;
|
||||
|
||||
Node *current = l.head;
|
||||
|
@ -74,7 +73,6 @@ SearchResult linked_list_search(LinkedList l, void *value, int (*compare_values)
|
|||
result.success = true;
|
||||
break;
|
||||
}
|
||||
result.index += 1;
|
||||
current = current->next;
|
||||
} while (current != l.head);
|
||||
|
||||
|
|
Loading…
Reference in a new issue