mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Task
- ::modify now assumes that it is not mandatory that there be a non-trivial set of changes. This can be overridden.
This commit is contained in:
parent
1f253f7fc8
commit
b4539a9df9
2 changed files with 3 additions and 3 deletions
|
@ -1934,7 +1934,7 @@ float Task::urgency_blocking () const
|
|||
// well as reducing the object depdendencies of Task.
|
||||
//
|
||||
// It came from the Command base object, but doesn't really belong there either.
|
||||
void Task::modify (modType type)
|
||||
void Task::modify (modType type, bool mods_required /* = false */)
|
||||
{
|
||||
std::string text = "";
|
||||
Tree* tree = context.parser.tree ();
|
||||
|
@ -2186,7 +2186,7 @@ void Task::modify (modType type)
|
|||
break;
|
||||
}
|
||||
}
|
||||
else if (modCount == 0)
|
||||
else if (modCount == 0 && mods_required)
|
||||
{
|
||||
throw std::string (STRING_CMD_MODIFY_NEED_TEXT);
|
||||
}
|
||||
|
|
|
@ -154,7 +154,7 @@ public:
|
|||
float urgency ();
|
||||
|
||||
enum modType {modReplace, modPrepend, modAppend, modAnnotate};
|
||||
void modify (modType);
|
||||
void modify (modType, bool mods_required = false);
|
||||
|
||||
private:
|
||||
int determineVersion (const std::string&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue