commit 5dc1978e1df1b7b83f2fc1d8e831fdd884b9eac2
parent 3b85ad87c74af82895b1f075dab87d1a42053568
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 2 Aug 2020 13:05:46 +0200
do not compile-in the lazyload code which is disabled by default
Shaves off a few bytes and it is a bit more clear this code is not executed.
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/sfeed_curses.c b/sfeed_curses.c
@@ -22,7 +22,7 @@
/* Allow to lazyload items when a file is specified? This saves memory but
increases some latency when seeking items. It also causes issues if the
feed is changed while having the UI open (and offsets are changed). */
-/*#define LAZYLOAD 1 */
+/*#define LAZYLOAD 1*/
#define LEN(a) sizeof((a))/sizeof((a)[0])
@@ -1487,6 +1487,7 @@ feed_row_match(struct pane *p, struct row *row, const char *s)
return (strcasestr(feed->name, s) != NULL);
}
+#ifdef LAZYLOAD
struct row *
item_row_get(struct pane *p, off_t pos)
{
@@ -1519,6 +1520,7 @@ item_row_get(struct pane *p, off_t pos)
}
return itemrow;
}
+#endif
/* custom formatter for item row */
char *
@@ -1682,7 +1684,9 @@ main(int argc, char *argv[])
panes[PaneFeeds].row_format = feed_row_format;
panes[PaneFeeds].row_match = feed_row_match;
panes[PaneItems].row_format = item_row_format;
+#ifdef LAZYLOAD
panes[PaneItems].row_get = item_row_get;
+#endif
feeds = ecalloc(argc, sizeof(struct feed));
if (argc == 1) {