aboutsummaryrefslogtreecommitdiff
path: root/src/misc/lv_array.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc/lv_array.h')
-rw-r--r--src/misc/lv_array.h35
1 files changed, 7 insertions, 28 deletions
diff --git a/src/misc/lv_array.h b/src/misc/lv_array.h
index a32490913..e63f56318 100644
--- a/src/misc/lv_array.h
+++ b/src/misc/lv_array.h
@@ -70,40 +70,28 @@ void lv_array_deinit(lv_array_t * array);
* @param array pointer to an `lv_array_t` variable
* @return the number of elements stored in the array
*/
-static inline uint32_t lv_array_size(const lv_array_t * array)
-{
- return array->size;
-}
+uint32_t lv_array_size(const lv_array_t * array);
/**
* Return the capacity of the array, i.e. how many elements can be stored.
* @param array pointer to an `lv_array_t` variable
* @return the capacity of the array
*/
-static inline uint32_t lv_array_capacity(const lv_array_t * array)
-{
- return array->capacity;
-}
+uint32_t lv_array_capacity(const lv_array_t * array);
/**
* Return if the array is empty
* @param array pointer to an `lv_array_t` variable
* @return true: array is empty; false: array is not empty
*/
-static inline bool lv_array_is_empty(const lv_array_t * array)
-{
- return array->size == 0;
-}
+bool lv_array_is_empty(const lv_array_t * array);
/**
* Return if the array is full
* @param array pointer to an `lv_array_t` variable
* @return true: array is full; false: array is not full
*/
-static inline bool lv_array_is_full(const lv_array_t * array)
-{
- return array->size == array->capacity;
-}
+bool lv_array_is_full(const lv_array_t * array);
/**
* Copy an array to another.
@@ -117,10 +105,7 @@ void lv_array_copy(lv_array_t * target, const lv_array_t * source);
* Remove all elements in array.
* @param array pointer to an `lv_array_t` variable
*/
-static inline void lv_array_clear(lv_array_t * array)
-{
- array->size = 0;
-}
+void lv_array_clear(lv_array_t * array);
/**
* Shrink the memory capacity of array if necessary.
@@ -187,19 +172,13 @@ void * lv_array_at(const lv_array_t * array, uint32_t index);
* @param array pointer to an `lv_array_t` variable
* @return a pointer to the first element in the array
*/
-static inline void * lv_array_front(const lv_array_t * array)
-{
- return lv_array_at(array, 0);
-}
+void * lv_array_front(const lv_array_t * array);
/**
* Returns a pointer to the last element in the array.
* @param array pointer to an `lv_array_t` variable
*/
-static inline void * lv_array_back(const lv_array_t * array)
-{
- return lv_array_at(array, lv_array_size(array) - 1);
-}
+void * lv_array_back(const lv_array_t * array);
/**********************
* MACROS