From 4f3a08c3c5ffe451e48340205ba5ba866828eb17 Mon Sep 17 00:00:00 2001 From: Joursoir Date: Wed, 7 Apr 2021 21:26:48 +0000 Subject: xstdlib: add template for linked list --- src/xstdlib/xstdlib.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/xstdlib/xstdlib.hpp b/src/xstdlib/xstdlib.hpp index 7a2c704..1b4fd03 100644 --- a/src/xstdlib/xstdlib.hpp +++ b/src/xstdlib/xstdlib.hpp @@ -1,6 +1,15 @@ #ifndef ENGINE_XSTDLIB_H #define ENGINE_XSTDLIB_H +template +struct linked_list { + T *data; + struct linked_list *next; + + linked_list(T *a_data, struct linked_list *a_next) + : data(a_data), next(a_next) { } +}; + char *xfread(const char *path, const char *mode); #endif /* ENGINE_XSTDLIB_H */ -- cgit v1.2.3-18-g5258