-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbyte_array_add.c
More file actions
22 lines (20 loc) · 1.08 KB
/
byte_array_add.c
File metadata and controls
22 lines (20 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* byte_array_add.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: oadhesiv <oadhesiv@student.21-school.ru> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/07/12 17:30:32 by oadhesiv #+# #+# */
/* Updated: 2020/05/31 13:52:51 by oadhesiv ### ########.fr */
/* */
/* ************************************************************************** */
#include "array.h"
t_byte_array *byte_array_add(t_byte_array *arr, t_byte data)
{
if (arr->size == arr->used)
arr = byte_array_resize(arr, arr->size);
arr->data[arr->used] = data;
arr->used++;
return (arr);
}