Убрал утечку памяти

This commit is contained in:
AZEN-SGG 2024-12-15 16:38:50 +03:00
parent 5a6972e698
commit 7e7ec0e12c
3 changed files with 13 additions and 22 deletions

View file

@ -8,6 +8,17 @@
#include <math.h>
#include "types.h"
#define DELFUNC(NAME, TYPE) \
void del##NAME(TYPE * array, int index) { \
DEL(array->arr, index, array->len) \
array -> len--; \
}
#define DEL(DATA, INDEX, LEN) \
for (int i = INDEX; i < (LEN) - 1; ++i) { \
(DATA)[i] = (DATA)[i + 1]; \
}
line getLine(point pt1, point pt2);
lines getLines(points pts);
points getVectors(points pts);