From 2f1d7a73ce4ab6631499075e8f6e01616e56ac06 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Wed, 4 Jun 2014 13:23:50 -0400 Subject: [PATCH] database: Set an item's ID before reading it in Tracks need to know their own ID to set up filtering properly. Signed-off-by: Anna Schumaker --- include/database.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/database.hpp b/include/database.hpp index cec0056a..0ae77a93 100644 --- a/include/database.hpp +++ b/include/database.hpp @@ -67,8 +67,8 @@ void Database :: load() _db[i] = NULL; else { _db[i] = new T; - _db[i]->read(_file); _db[i]->id = i; + _db[i]->read(_file); _keys[_db[i]->primary_key()] = i; _size++; }