]> git.tdb.fi Git - builder.git/blobdiff - source/tar.h
Refactor InternalTask to take a functor
[builder.git] / source / tar.h
index d0240d93bf315c71b0b1536dd38e07ea16352d00..fa4a4d6070100098f3da70520caa7efa696cac4f 100644 (file)
@@ -1,33 +1,21 @@
 #ifndef TAR_H_
 #define TAR_H_
 
-#include <msp/core/thread.h>
-#include "internaltask.h"
 #include "tool.h"
 
 class TarBall;
 
 class Tar: public Tool
 {
-private:
-       class Worker: public InternalTask::Worker
-       {
-       private:
-               const TarBall &tarball;
-
-       public:
-               Worker(const TarBall &);
-
-       private:
-               void main() override;
-               void store_number(char *, unsigned, unsigned);
-       };
-
 public:
        Tar(Builder &);
 
        Target *create_target(const std::vector<Target *> &, const std::string &) override;
        Task *run(const Target &) const override;
+
+private:
+       static bool _run(const TarBall &);
+       static void store_number(char *, unsigned, unsigned);
 };
 
 #endif