Database: Remove firstpos/pos_history

From what I can tell, this is unused historical
baggage that has no effect whatsoever these
days.

Change-Id: I1b6fed64e7bf5cc4db4ec028617c818c59d81324
This commit is contained in:
Christian Soffke 2022-10-31 20:57:49 +01:00 committed by Aidan MacDonald
parent ca908d6336
commit 9da3044cf7
3 changed files with 1 additions and 11 deletions

View file

@ -1847,7 +1847,6 @@ int tagtree_enter(struct tree_context* c)
selected_item_history[c->dirlevel]=c->selected_item;
table_history[c->dirlevel] = c->currtable;
extra_history[c->dirlevel] = c->currextra;
c->pos_history[c->dirlevel] = c->firstpos;
c->dirlevel++;
/* lock buflib for possible I/O to protect dptr */
@ -1995,7 +1994,6 @@ void tagtree_exit(struct tree_context* c)
gui_synclist_select_item(&tree_lists, c->selected_item);
c->currtable = table_history[c->dirlevel];
c->currextra = extra_history[c->dirlevel];
c->firstpos = c->pos_history[c->dirlevel];
}
int tagtree_get_filename(struct tree_context* c, char *buf, int buflen)

View file

@ -89,7 +89,7 @@ static struct tree_context tc;
char lastfile[MAX_PATH];
static char lastdir[MAX_PATH];
#ifdef HAVE_TAGCACHE
static int lasttable, lastextra, lastfirstpos;
static int lasttable, lastextra;
#endif
static bool reload_dir = false;
@ -364,7 +364,6 @@ static int update_dir(void)
if (id3db) {
if (tc.currtable != lasttable ||
tc.currextra != lastextra ||
tc.firstpos != lastfirstpos ||
reload_dir)
{
if (tagtree_load(&tc) < 0)
@ -372,7 +371,6 @@ static int update_dir(void)
lasttable = tc.currtable;
lastextra = tc.currextra;
lastfirstpos = tc.firstpos;
changed = true;
}
}
@ -636,10 +634,8 @@ static int dirbrowse(void)
if (tc.selected_item < 0)
tc.selected_item = 0;
#ifdef HAVE_TAGCACHE
tc.firstpos = 0;
lasttable = -1;
lastextra = -1;
lastfirstpos = 0;
#endif
start_wps = false;

View file

@ -81,10 +81,6 @@ struct tree_context {
* (used when we want to return back to a previouws directory)*/
int selected_item_history[MAX_DIR_LEVELS];
int firstpos; /* which dir entry is on first
position in dir buffer */
int pos_history[MAX_DIR_LEVELS];
int *dirfilter; /* file use */
int filesindir; /* The number of files in the dircache */
int dirsindir; /* file use */