Permalink
Browse files

Some code clean-up

  • Loading branch information...
lauft committed Jul 31, 2018
1 parent 4e1d37b commit e2db4a42b2651dbf41953dd5f73b4764cfb48650
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/Database.cpp
@@ -44,7 +44,9 @@ void Database::initialize (const std::string& location)
void Database::commit ()
{
for (auto& file : _files)
{
file.commit ();
}

File::write (_location + "/tags.data", _tagInfoDatabase.toJson ());
}
@@ -64,7 +66,9 @@ std::vector <std::string> Database::files () const
std::string Database::lastLine ()
{
if (_files.empty ())
{
initializeDatafiles ();
}

std::vector <Datafile>::reverse_iterator ri;
for (ri = _files.rbegin (); ri != _files.rend (); ri++)
@@ -81,7 +85,9 @@ std::string Database::lastLine ()
std::vector <std::string> Database::allLines ()
{
if (_files.empty ())
{
initializeDatafiles ();
}

std::vector <std::string> all;
for (auto& file : _files)

0 comments on commit e2db4a4

Please sign in to comment.