Libft
Custom implementation of core libc functions with additional utility helpers.
Loading...
Searching...
No Matches
vector_ops_vectors.c File Reference
#include "libft.h"
#include <stdlib.h>
#include <stdint.h>
Include dependency graph for vector_ops_vectors.c:

Functions

static bool grow_and_merge (t_vector *dst, const t_vector *src, size_t index)
 
static bool compute_new_cap (size_t dst_len, size_t src_len, size_t *new_cap)
 
bool vector_merge (t_vector *dst, const t_vector *src, size_t index)
 Inserts all items from src into dst at a specific index.
 
void vector_clear (t_vector *vector, void(*del)(void *))
 Removes all items from a vector without freeing its storage.
 
void vector_take (t_vector *dst, t_vector *src)
 Transfers a vector state into another one without copying items.
 

Function Documentation

◆ compute_new_cap()

static bool compute_new_cap ( size_t  dst_len,
size_t  src_len,
size_t *  new_cap 
)
static
Here is the caller graph for this function:

◆ grow_and_merge()

static bool grow_and_merge ( t_vector dst,
const t_vector src,
size_t  index 
)
static
Here is the call graph for this function:
Here is the caller graph for this function: