From f4521005883dad977d293de38465c3cce6d6c55e Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Sat, 23 Apr 2022 18:28:32 +0000 Subject: [PATCH] Remove references to TDB2::data_size This value will is not relevant for TaskChampion. --- src/TDB2.cpp | 6 ------ src/TDB2.h | 1 - src/commands/CmdStats.cpp | 7 ------- 3 files changed, 14 deletions(-) diff --git a/src/TDB2.cpp b/src/TDB2.cpp index 9ce806f25..8bd3c2f9c 100644 --- a/src/TDB2.cpp +++ b/src/TDB2.cpp @@ -1285,12 +1285,6 @@ int TDB2::num_reverts_possible () return std::count(lines.begin(), lines.end(), "---"); } -//////////////////////////////////////////////////////////////////////////////// -size_t TDB2::data_size () -{ - return pending._file.size () + completed._file.size () + undo._file.size () + backlog._file.size (); -} - //////////////////////////////////////////////////////////////////////////////// void TDB2::dump () { diff --git a/src/TDB2.h b/src/TDB2.h index a20a20e41..52455c575 100644 --- a/src/TDB2.h +++ b/src/TDB2.h @@ -139,7 +139,6 @@ public: int num_local_changes (); int num_reverts_possible (); - size_t data_size (); void dump (); diff --git a/src/commands/CmdStats.cpp b/src/commands/CmdStats.cpp index 393c7d02a..7e5c92089 100644 --- a/src/commands/CmdStats.cpp +++ b/src/commands/CmdStats.cpp @@ -62,9 +62,6 @@ int CmdStats::execute (std::string& output) std::string dateformat = Context::getContext ().config.get ("dateformat"); - // Go get the file sizes. - size_t dataSize = Context::getContext ().tdb2.data_size (); - // Count the possible reverts. int undoCount = Context::getContext ().tdb2.num_reverts_possible (); @@ -192,10 +189,6 @@ int CmdStats::execute (std::string& output) view.set (row, 0, "Blocking tasks"); view.set (row, 1, blockingT); - row = view.addRow (); - view.set (row, 0, "Data size"); - view.set (row, 1, formatBytes (dataSize)); - row = view.addRow (); view.set (row, 0, "Undo transactions"); view.set (row, 1, undoCount);