X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcopy.cpp;h=0073320504b0daff45e2c9577a93e9ab4c095dff;hb=92ab07ba1704c3d66dcc5e3e6a1c78e5d2738515;hp=b756e0c037412012a828075735a7b6fb8eb3b679;hpb=8fa75f16e653e22f188bc09c5d04c3cdb5cf8c52;p=builder.git diff --git a/source/copy.cpp b/source/copy.cpp index b756e0c..0073320 100644 --- a/source/copy.cpp +++ b/source/copy.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include @@ -19,8 +19,7 @@ Copy::Copy(Builder &b): Target *Copy::create_target(const list &sources, const string &arg) const { FileTarget &file_tgt = dynamic_cast(*sources.front()); - const SourcePackage &pkg = dynamic_cast(*file_tgt.get_package()); - InstalledFile *inst = new InstalledFile(builder, pkg, file_tgt, arg); + InstalledFile *inst = new InstalledFile(builder, *file_tgt.get_package(), file_tgt, arg); inst->set_tool(*this); return inst; } @@ -35,9 +34,7 @@ Task *Copy::run(const Target &target) const Copy::Worker::Worker(const InstalledFile &t): target(t) -{ - launch(); -} +{ } void Copy::Worker::main() {