fix: don't free gametime, it is stack-allocated

This commit is contained in:
2025-03-22 14:52:13 +01:00
parent 337745b76f
commit f4681cfc60
2 changed files with 0 additions and 6 deletions

View File

@@ -23,6 +23,5 @@ void game_update(gamedata* dat) {
} }
void game_free(gamedata* dat) { void game_free(gamedata* dat) {
gametime_free(dat->time);
*dat = (gamedata){0}; *dat = (gamedata){0};
} }

View File

@@ -1,6 +1,5 @@
#pragma once #pragma once
#include <stdlib.h>
#include <time.h> #include <time.h>
#include "../util/attributes.h" #include "../util/attributes.h"
@@ -25,10 +24,6 @@ atrb_const static inline gametime gametime_new(void) {
}; };
} }
static inline void gametime_free(gametime* gt) {
free(gt);
}
// updates the internal variables // updates the internal variables
static inline void gametime_update(gametime* gt) { static inline void gametime_update(gametime* gt) {
struct timespec ts; struct timespec ts;