From 5f8469269edfc4c8b06068a8f96f59147b8406f8 Mon Sep 17 00:00:00 2001 From: Wilhelm Schuermann Date: Sun, 31 May 2015 16:41:57 +0200 Subject: [PATCH] Cleanup: Remove unused function - Unused since 2010, removed in accordance with Paul's wishes. --- src/commands/CmdModify.cpp | 3 --- src/dependency.cpp | 42 -------------------------------------- src/main.h | 1 - 3 files changed, 46 deletions(-) diff --git a/src/commands/CmdModify.cpp b/src/commands/CmdModify.cpp index 8c04c3517..03aeed656 100644 --- a/src/commands/CmdModify.cpp +++ b/src/commands/CmdModify.cpp @@ -137,7 +137,6 @@ int CmdModify::modifyAndUpdate ( int count = 0; updateRecurrenceMask (after); - dependencyChainOnModify (before, after); ++count; feedback_affected (STRING_CMD_MODIFY_TASK, after); feedback_unblocked (after); @@ -176,7 +175,6 @@ int CmdModify::modifyRecurrenceSiblings ( Task alternate (sibling); sibling.modify (Task::modReplace); updateRecurrenceMask (sibling); - dependencyChainOnModify (alternate, sibling); ++count; feedback_affected (STRING_CMD_MODIFY_TASK_R, sibling); feedback_unblocked (sibling); @@ -213,7 +211,6 @@ int CmdModify::modifyRecurrenceParent ( child.modify (Task::modReplace); updateRecurrenceMask (child); context.tdb2.modify (child); - dependencyChainOnModify (alternate, child); if (context.verbose ("project") && projectChanges) (*projectChanges)[child.get ("project")] = onProjectChange (alternate, child); ++count; diff --git a/src/dependency.cpp b/src/dependency.cpp index 1a3fe2e8c..32869345a 100644 --- a/src/dependency.cpp +++ b/src/dependency.cpp @@ -209,45 +209,3 @@ void dependencyChainOnStart (Task& task) } //////////////////////////////////////////////////////////////////////////////// -// Iff a dependency is being removed, is there something to do. -void dependencyChainOnModify (Task& before, Task& after) -{ - // TODO It is not clear that this should even happen. TBD. -/* - // Get the dependencies from before. - std::string depends = before.get ("depends"); - std::vector before_depends; - split (before_depends, depends, ','); - std::cout << "# dependencyChainOnModify before has " << before_depends.size () << "\n"; - - // Get the dependencies from after. - depends = after.get ("depends"); - std::vector after_depends; - split (after_depends, depends, ','); - std::cout << "# dependencyChainOnModify after has " << after_depends.size () << "\n"; - - // listDiff - std::vector before_only; - std::vector after_only; - listDiff (before_depends, after_depends, before_only, after_only); - - // Any dependencies in before_only indicates that a dependency was removed. - if (before_only.size ()) - { - std::cout << "# dependencyChainOnModify detected a dependency removal\n"; - - // before dep:2,3 - // after dep:2 - // - // any tasks blocked by after might should be repaired to depend on 3. - - std::vector blocked; - dependencyGetBlocked (after, blocked); - - for (auto& b : blocked) - std::cout << "# dependencyChainOnModify\n"; - } -*/ -} - -//////////////////////////////////////////////////////////////////////////////// diff --git a/src/main.h b/src/main.h index 3c2b0be86..3b0bc281f 100644 --- a/src/main.h +++ b/src/main.h @@ -58,7 +58,6 @@ void dependencyGetBlocking (const Task&, std::vector &); bool dependencyIsCircular (const Task&); void dependencyChainOnComplete (Task&); void dependencyChainOnStart (Task&); -void dependencyChainOnModify (Task&, Task&); // feedback.cpp bool taskDiff (const Task&, const Task&);