Commit: 88044806c8b458ad97f025a434ad9a4e2526f312
Parent: 238f0075edd1cf60918cfa7a17fb1b94aed8f79e
Author: Randy Palamar
Date: Thu, 26 Aug 2021 13:58:30 -0600
oboeru: reduce padding in Card struct
also change leeches to uint8_t. arguably useless but committing anyways
Diffstat:
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/config.def.h b/config.def.h
@@ -1,5 +1,5 @@
/* number of times a mature card can be failed */
-/* before it is excluded from reviews */
+/* before it is excluded from reviews. must be <= 255 */
#define MAX_LEECHES 4
/* the minimum age in seconds for card to be considerd a leech */
diff --git a/oboeru.c b/oboeru.c
@@ -22,12 +22,10 @@ enum {
};
typedef struct {
- size_t id, deck;
- int leeches;
- /* seconds since epoch */
int64_t reviewed, due;
+ size_t id, deck;
char *extra;
- int8_t nobump;
+ uint8_t leeches, nobump;
} Card;
typedef struct node {