diff options
author | Joursoir <chat@joursoir.net> | 2021-04-07 21:26:48 +0000 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2021-04-07 21:26:48 +0000 |
commit | 4f3a08c3c5ffe451e48340205ba5ba866828eb17 (patch) | |
tree | 3420408c17f53db6c8cdbf2e71fbb97d9217d9e7 /src/xstdlib | |
parent | 386504218362232385c61eca6365b95776c60c62 (diff) | |
download | space-simulator-4f3a08c3c5ffe451e48340205ba5ba866828eb17.tar.gz space-simulator-4f3a08c3c5ffe451e48340205ba5ba866828eb17.tar.bz2 space-simulator-4f3a08c3c5ffe451e48340205ba5ba866828eb17.zip |
xstdlib: add template for linked list
Diffstat (limited to 'src/xstdlib')
-rw-r--r-- | src/xstdlib/xstdlib.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
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 <class T> +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 */ |