Remove call to getAllInclusions when initializing tag database

This commit is contained in:
Shaun Ruffell 2019-11-28 18:00:22 -06:00 committed by lauft
parent cf8c35ad55
commit e9f860d8ce

View file

@ -28,6 +28,7 @@
#include <Database.h>
#include <format.h>
#include <JSON.h>
#include <IntervalFactory.h>
#include <iostream>
#include <iomanip>
#include <shared.h>
@ -443,17 +444,17 @@ void Database::initializeTagDatabase ()
if (!File::read (_location + "/tags.data", content))
{
auto intervals = getAllInclusions (*this);
if (intervals.empty ())
{
auto it = rbegin ();
auto end = rend ();
if (it == end)
return;
}
std::cout << "Tag info database does not exist. Recreating from interval data..." << std::endl ;
for (auto& interval : intervals)
for (; it != end; ++it)
{
Interval interval = IntervalFactory::fromSerialization (*it);
for (auto& tag : interval.tags ())
{
_tagInfoDatabase.incrementTag (tag);