From: Mikko Rasa Date: Thu, 22 Dec 2022 14:22:22 +0000 (+0200) Subject: Remove redundant task setup from Copy X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=36c90dafd6ff514919b802ccb54404b882afc944;p=builder.git Remove redundant task setup from Copy FileTarget already does this --- diff --git a/source/copy.cpp b/source/copy.cpp index 31e6210..9bca33f 100644 --- a/source/copy.cpp +++ b/source/copy.cpp @@ -26,10 +26,7 @@ Target *Copy::create_target(const vector &sources, const string &arg) Task *Copy::run(const Target &target) const { const InstalledFile &install = dynamic_cast(target); - InternalTask *task = new InternalTask([&install]{ return _run(install); }); - task->add_file(install.get_path()); - task->set_unlink(); - return task; + return new InternalTask([&install]{ return _run(install); }); } bool Copy::_run(const InstalledFile &install)