diff options
author | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2022-10-13 01:13:12 +0300 |
---|---|---|
committer | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2022-10-13 01:13:12 +0300 |
commit | f2c1beb5c3139238a3570d8f5052635519367d26 (patch) | |
tree | 3fead62d792b67b98f7c3396553427a51aa72e79 /include/site.h | |
parent | 896f8585ee8661ccea918d8f30007dc9b513eb39 (diff) | |
download | revela-f2c1beb5c3139238a3570d8f5052635519367d26.tar.gz revela-f2c1beb5c3139238a3570d8f5052635519367d26.zip |
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 :/
Diffstat (limited to 'include/site.h')
-rw-r--r-- | include/site.h | 4 |
1 files changed, 2 insertions, 2 deletions
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; |