fix(linked list): added missing const to function parameters
This commit is contained in:
parent
c7b866ce1d
commit
22e9d69ced
3 changed files with 5 additions and 5 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1,2 +1,3 @@
|
||||||
Build
|
Build
|
||||||
compile_commands.json
|
compile_commands.json
|
||||||
|
.cache
|
||||||
|
|
@ -51,7 +51,7 @@ FledastyError fledasty_linked_list_insert_after_value(FledastyLinkedList *curren
|
||||||
FledastyError fledasty_linked_list_remove_at_index(FledastyLinkedList *current_linked_list, const size_t index);
|
FledastyError fledasty_linked_list_remove_at_index(FledastyLinkedList *current_linked_list, const size_t index);
|
||||||
FledastyError fledasty_linked_list_remove_value(FledastyLinkedList *current_linked_list, void *value);
|
FledastyError fledasty_linked_list_remove_value(FledastyLinkedList *current_linked_list, void *value);
|
||||||
|
|
||||||
bool fledasty_linked_list_has_value(FledastyLinkedList *current_linked_list, void *value);
|
bool fledasty_linked_list_has_value(const FledastyLinkedList *current_linked_list, void *value);
|
||||||
static inline bool fledasty_linked_list_is_empty(FledastyLinkedList *current_linked_list) { return current_linked_list->size == 0; }
|
static inline bool fledasty_linked_list_is_empty(const FledastyLinkedList *current_linked_list) { return current_linked_list->size == 0; }
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@
|
||||||
* -----------------------------------------------------------------------------
|
* -----------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
#include "../../Include/Fledasty/Core/LinkedList.h"
|
#include "../../Include/Fledasty/Core/LinkedList.h"
|
||||||
#include "Fledasty/Utils/Error.h"
|
|
||||||
|
|
||||||
#include <Hallocy/Core/Allocator.h>
|
#include <Hallocy/Core/Allocator.h>
|
||||||
#include <Hallocy/Core/Memory.h>
|
#include <Hallocy/Core/Memory.h>
|
||||||
|
|
@ -273,7 +272,7 @@ FledastyError fledasty_linked_list_remove_value(FledastyLinkedList *current_link
|
||||||
return FLEDASTY_ERROR_NONE;
|
return FLEDASTY_ERROR_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool fledasty_linked_list_has_value(FledastyLinkedList *current_linked_list, void *value) {
|
bool fledasty_linked_list_has_value(const FledastyLinkedList *current_linked_list, void *value) {
|
||||||
if (current_linked_list == NULL || value == NULL) {
|
if (current_linked_list == NULL || value == NULL) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue