mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
remove constness from composeJSON so it can use caches
This commit is contained in:
parent
c60f1d6de0
commit
b442935ee2
4 changed files with 4 additions and 4 deletions
|
@ -275,7 +275,7 @@ void Hooks::onAdd(Task& task) const {
|
|||
// - all emitted non-JSON lines are considered feedback or error messages
|
||||
// depending on the status code.
|
||||
//
|
||||
void Hooks::onModify(const Task& before, Task& after) const {
|
||||
void Hooks::onModify(Task& before, Task& after) const {
|
||||
if (!_enabled) return;
|
||||
|
||||
Timer timer;
|
||||
|
|
|
@ -40,7 +40,7 @@ class Hooks {
|
|||
void onLaunch() const;
|
||||
void onExit() const;
|
||||
void onAdd(Task&) const;
|
||||
void onModify(const Task&, Task&) const;
|
||||
void onModify(Task&, Task&) const;
|
||||
std::vector<std::string> list() const;
|
||||
|
||||
private:
|
||||
|
|
|
@ -777,7 +777,7 @@ void Task::parseLegacy(const std::string& line) {
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::string Task::composeJSON(bool decorate /*= false*/) const {
|
||||
std::string Task::composeJSON(bool decorate /*= false*/) {
|
||||
std::stringstream out;
|
||||
out << '{';
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ class Task {
|
|||
Task(rust::Box<tc::TaskData>);
|
||||
|
||||
void parse(const std::string&);
|
||||
std::string composeJSON(bool decorate = false) const;
|
||||
std::string composeJSON(bool decorate = false);
|
||||
|
||||
// Status values.
|
||||
enum status { pending, completed, deleted, recurring, waiting };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue