From f2c1beb5c3139238a3570d8f5052635519367d26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaroslav=20de=20la=20Pe=C3=B1a=20Smirnov?= Date: Thu, 13 Oct 2022 01:13:12 +0300 Subject: Switch to vector + qsort instead of bst Doesn't improve perfomance that much (sorting is far from the hotspot), but I realized that I didn't really need a BST for this use-case and I felt dumb for using one :/ --- include/site.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/site.h') diff --git a/include/site.h b/include/site.h index 43a20d2..0f45667 100644 --- a/include/site.h +++ b/include/site.h @@ -2,7 +2,6 @@ #define REVELA_SITE_H #include "config.h" -#include "bstree.h" #include "render.h" #include "components.h" @@ -29,7 +28,8 @@ struct site { * site_init() */ size_t rel_content_dir; - struct bstree *albums; + /* List/vector with the albums to be sorted from newer to older */ + struct vector *albums; /* Files/dirs that belong to albums and which shouldn't be deleted */ struct hmap *album_dirs; struct render render; -- cgit v1.2.3