mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Database: Removed unused top-level _dirty flag
This commit is contained in:
parent
11548dcb4a
commit
1aa72f99b6
2 changed files with 2 additions and 13 deletions
|
@ -64,14 +64,9 @@ void Database::initialize (const std::string& location)
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Database::commit ()
|
||||
{
|
||||
if (_dirty)
|
||||
{
|
||||
for (auto& file : _files)
|
||||
file.commit ();
|
||||
|
||||
_dirty = false;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -123,21 +118,18 @@ void Database::clearExclusions ()
|
|||
void Database::addExclusion (const Exclusion& exclusion)
|
||||
{
|
||||
_exclusions.push_back (exclusion);
|
||||
_dirty = true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Database::addInterval (const Interval& interval)
|
||||
{
|
||||
_files.back ().addInterval (interval);
|
||||
_dirty = true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Database::modifyInterval (const Interval& interval)
|
||||
{
|
||||
_files.back ().modifyInterval (interval);
|
||||
_dirty = true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -148,8 +140,6 @@ std::string Database::dump () const
|
|||
for (auto& file : _files)
|
||||
out << " Datafile: " << file.name () << "\n";
|
||||
|
||||
out << " Dirty: " << (_dirty ? "true" : "false") << "\n";
|
||||
|
||||
for (auto& exclusion : _exclusions)
|
||||
out << " Exclusion: " << exclusion.serialize () << "\n";
|
||||
|
||||
|
|
|
@ -57,7 +57,6 @@ private:
|
|||
private:
|
||||
std::string _location {"~/.timewarrior/data"};
|
||||
std::vector <Datafile> _files {};
|
||||
bool _dirty {false};
|
||||
std::vector <Exclusion> _exclusions {};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue