chore: integrate cppcheck into workflow
This commit is contained in:
parent
b053aa6c93
commit
6af3e6ad6d
17 changed files with 64 additions and 69 deletions
|
|
@ -28,7 +28,7 @@ void lsm_bt_clear(lsm_bt *bt);
|
|||
/**
|
||||
* Return the size of the binary tree
|
||||
*/
|
||||
uint64_t lsm_bt_size(lsm_bt *bt);
|
||||
uint64_t lsm_bt_size(const lsm_bt *bt);
|
||||
|
||||
/**
|
||||
* Search for the data stored behind the given key.
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ lsm_error lsm_store_init(lsm_store **ptr);
|
|||
* @param store store to use
|
||||
* @return how many elements are in the store
|
||||
*/
|
||||
uint64_t lsm_store_size(lsm_store *store);
|
||||
uint64_t lsm_store_size(const lsm_store *store);
|
||||
|
||||
/**
|
||||
* Open the given database file and load it into a new store object.
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ lsm_error lsm_str_init_zero(lsm_str **ptr);
|
|||
* @param ptr pointer to store newly allocated pointer
|
||||
* @param s string to copy into lsm string
|
||||
*/
|
||||
lsm_error lsm_str_init_copy(lsm_str **ptr, char *s);
|
||||
lsm_error lsm_str_init_copy(lsm_str **ptr, const char *s);
|
||||
|
||||
/**
|
||||
* Same as `lsm_str_init_copy`, except that it takes an additional argument
|
||||
|
|
@ -45,7 +45,7 @@ lsm_error lsm_str_init_copy(lsm_str **ptr, char *s);
|
|||
* @param s string to copy into lsm string
|
||||
* @param len length of string to copy
|
||||
*/
|
||||
lsm_error lsm_str_init_copy_n(lsm_str **ptr, char *s, uint64_t len);
|
||||
lsm_error lsm_str_init_copy_n(lsm_str **ptr, const char *s, uint64_t len);
|
||||
|
||||
/**
|
||||
* Overwrite an existing lsm_str so it now represents the new provided string.
|
||||
|
|
@ -65,7 +65,7 @@ void lsm_str_overwrite(lsm_str *str, char *s);
|
|||
* @param str lsm_str object to modify
|
||||
* @param s string to copy into lsm string
|
||||
*/
|
||||
lsm_error lsm_str_overwrite_copy(lsm_str *str, char *s);
|
||||
lsm_error lsm_str_overwrite_copy(lsm_str *str, const char *s);
|
||||
|
||||
/**
|
||||
* Same as `lsm_str_overwrite_copy`, except the length is explicitely specified,
|
||||
|
|
@ -75,7 +75,7 @@ lsm_error lsm_str_overwrite_copy(lsm_str *str, char *s);
|
|||
* @param s string to copy into lsm string
|
||||
* @param len length of the string to copy
|
||||
*/
|
||||
lsm_error lsm_str_overwrite_copy_n(lsm_str *str, char *s, uint64_t len);
|
||||
lsm_error lsm_str_overwrite_copy_n(lsm_str *str, const char *s, uint64_t len);
|
||||
|
||||
/**
|
||||
* Deallocate the existing internal string if needed and replace the lsm_str
|
||||
|
|
@ -99,7 +99,7 @@ void lsm_str_free(lsm_str *str);
|
|||
*
|
||||
* @param str string to return length for.
|
||||
*/
|
||||
uint64_t lsm_str_len(lsm_str *str);
|
||||
uint64_t lsm_str_len(const lsm_str *str);
|
||||
|
||||
/**
|
||||
* Return a pointer to the string's underlying char array. Note that this array
|
||||
|
|
|
|||
|
|
@ -55,6 +55,6 @@ lsm_error lsm_trie_remove(void **data, lsm_trie *trie, lsm_str *key);
|
|||
*
|
||||
* @param trie trie to return size for
|
||||
*/
|
||||
uint64_t lsm_trie_size(lsm_trie *trie);
|
||||
uint64_t lsm_trie_size(const lsm_trie *trie);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue