diff options
| author | Mikkel Thestrup <mithe24@student.sdu.dk> | 2025-12-11 11:00:00 +0100 |
|---|---|---|
| committer | Mikkel Thestrup <mithe24@student.sdu.dk> | 2025-12-11 11:00:00 +0100 |
| commit | 8f512a36a5687b806e27775480878dded7a028ef (patch) | |
| tree | 97c2624fcfefe8bc2f401b674ac31a347cfab0c8 /src/vector.h | |
| parent | 2d4bdcdbfe9e3db3c0f204e843a271c929fec623 (diff) | |
| download | cycle-detector-8f512a36a5687b806e27775480878dded7a028ef.tar.gz cycle-detector-8f512a36a5687b806e27775480878dded7a028ef.zip | |
I prefer inline typedef
Diffstat (limited to '')
| -rw-r--r-- | src/vector.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/vector.h b/src/vector.h index eaca5f8..c3a86b3 100644 --- a/src/vector.h +++ b/src/vector.h @@ -36,13 +36,7 @@ * as elements are added. It tracks both the number of elements * currently stored (size) and the total allocated space (capacity). */ -typedef struct Vector Vector; - -/** - * @struct Vector - * @brief A dynamic array container structure. - */ -struct Vector { +typedef struct Vector { /** * @brief Array of generic data pointers. * @details A dynamically allocated array of (void*) pointers, @@ -68,7 +62,7 @@ struct Vector { * capacity >= size. */ size_t capacity; -}; +} Vector; /** * @brief Allocates and initializes an empty vector. |