format: update .clang-format

This commit is contained in:
beriff
2026-03-05 17:55:11 +07:00
parent eefd95e4d2
commit f001b90745
12 changed files with 93 additions and 91 deletions

View File

@@ -1,14 +1,14 @@
#include "primitives.h"
VektorPolyline *vektor_polyline_new(void) {
VektorPolyline *pl = malloc(sizeof(VektorPolyline));
VektorPolyline* vektor_polyline_new(void) {
VektorPolyline* pl = malloc(sizeof(VektorPolyline));
pl->count = 0;
pl->capacity = 4;
pl->points = malloc(sizeof(V2) * pl->capacity);
return pl;
}
void vektor_polyline_add_point(VektorPolyline *pl, V2 point) {
void vektor_polyline_add_point(VektorPolyline* pl, V2 point) {
if (pl->count >= pl->capacity) {
pl->capacity *= 2;
pl->points = realloc(pl->points, sizeof(V2) * pl->capacity);
@@ -16,22 +16,22 @@ void vektor_polyline_add_point(VektorPolyline *pl, V2 point) {
pl->points[pl->count++] = point;
}
void vektor_polyline_free(VektorPolyline *pl) {
void vektor_polyline_free(VektorPolyline* pl) {
if (!pl)
return;
free(pl->points);
free(pl);
}
VektorPolygon *vektor_polygon_new(void) {
VektorPolygon *pg = malloc(sizeof(VektorPolygon));
VektorPolygon* vektor_polygon_new(void) {
VektorPolygon* pg = malloc(sizeof(VektorPolygon));
pg->count = 0;
pg->capacity = 4;
pg->points = malloc(sizeof(V2) * pg->capacity);
return pg;
}
void vektor_polygon_add_point(VektorPolygon *pg, V2 point) {
void vektor_polygon_add_point(VektorPolygon* pg, V2 point) {
if (pg->count >= pg->capacity) {
pg->capacity *= 2;
pg->points = realloc(pg->points, sizeof(V2) * pg->capacity);
@@ -39,14 +39,14 @@ void vektor_polygon_add_point(VektorPolygon *pg, V2 point) {
pg->points[pg->count++] = point;
}
void vektor_polygon_free(VektorPolygon *pg) {
void vektor_polygon_free(VektorPolygon* pg) {
if (!pg)
return;
free(pg->points);
free(pg);
}
void vektor_primitivebuffer_add_primitive(VektorPrimitiveBuffer *buffer,
void vektor_primitivebuffer_add_primitive(VektorPrimitiveBuffer* buffer,
VektorPrimitive prim) {
if (buffer->count >= buffer->capacity) {
buffer->capacity = buffer->capacity ? buffer->capacity * 2 : 4;