Skip to content

Commit

Permalink
Change parameter name same as description (#52)
Browse files Browse the repository at this point in the history
The second parameter of cvector_reserve is n on the description
but capacity on the source code
Change it to n for unification
  • Loading branch information
Bojun-Seo committed Apr 24, 2023
1 parent 532391e commit 152a353
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cvector.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ typedef struct cvector_metadata_t {
* @param n - Minimum capacity for the vector.
* @return void
*/
#define cvector_reserve(vec, capacity) \
#define cvector_reserve(vec, n) \
do { \
size_t cv_cap__ = cvector_capacity(vec); \
if (cv_cap__ < (capacity)) { \
cvector_grow((vec), (capacity)); \
if (cv_cap__ < (n)) { \
cvector_grow((vec), (n)); \
} \
} while (0)

Expand Down

0 comments on commit 152a353

Please sign in to comment.