mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Database: Removed unused member
This commit is contained in:
parent
baa7671926
commit
beb620116b
2 changed files with 4 additions and 7 deletions
|
@ -37,7 +37,7 @@
|
||||||
void Database::initialize (const std::string& location)
|
void Database::initialize (const std::string& location)
|
||||||
{
|
{
|
||||||
_location = location;
|
_location = location;
|
||||||
_current = currentDataFile ();
|
auto current = currentDataFile ();
|
||||||
|
|
||||||
// Because the data files have names YYYY-MM.data, sorting them by name also
|
// Because the data files have names YYYY-MM.data, sorting them by name also
|
||||||
// sorts by the intervals within.
|
// sorts by the intervals within.
|
||||||
|
@ -47,8 +47,8 @@ void Database::initialize (const std::string& location)
|
||||||
|
|
||||||
// Ensure the list always contains the name of the current file, even if it
|
// Ensure the list always contains the name of the current file, even if it
|
||||||
// does not exist.
|
// does not exist.
|
||||||
if (std::find (files.begin (), files.end (), _current) == files.end ())
|
if (std::find (files.begin (), files.end (), current) == files.end ())
|
||||||
files.push_back (_current);
|
files.push_back (current);
|
||||||
|
|
||||||
for (auto& file : files)
|
for (auto& file : files)
|
||||||
{
|
{
|
||||||
|
@ -146,9 +146,7 @@ std::string Database::dump () const
|
||||||
std::stringstream out;
|
std::stringstream out;
|
||||||
out << "Database\n";
|
out << "Database\n";
|
||||||
for (auto& file : _files)
|
for (auto& file : _files)
|
||||||
out << " Datafile: " << file.name ()
|
out << " Datafile: " << file.name () << "\n";
|
||||||
<< (file.name () == _current ? " (current)" : "")
|
|
||||||
<< "\n";
|
|
||||||
|
|
||||||
out << " Dirty: " << (_dirty ? "true" : "false") << "\n";
|
out << " Dirty: " << (_dirty ? "true" : "false") << "\n";
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,6 @@ private:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string _location {"~/.timewarrior/data"};
|
std::string _location {"~/.timewarrior/data"};
|
||||||
std::string _current {};
|
|
||||||
std::vector <Datafile> _files {};
|
std::vector <Datafile> _files {};
|
||||||
bool _dirty {false};
|
bool _dirty {false};
|
||||||
std::vector <Exclusion> _exclusions {};
|
std::vector <Exclusion> _exclusions {};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue