]> git.tdb.fi Git - builder.git/blobdiff - source/tool.h
Use default member initializers and constructor delegation
[builder.git] / source / tool.h
index ce08a00af62aedc0aae64b8d901d579881103797..e1bef2d8652031324338de553b5c46689213a194 100644 (file)
@@ -31,26 +31,28 @@ public:
 
 protected:
        Builder &builder;
-       const Architecture *architecture;
+       const Architecture *architecture = 0;
        std::string tag;
        std::string command;
-       FileTarget *executable;
+       FileTarget *executable = 0;
        std::vector<std::string> input_suffixes;
        std::vector<std::string> aux_suffixes;
-       ProcessingUnit processing_unit;
+       ProcessingUnit processing_unit = ONE_FILE;
        VirtualFileSystem::SearchPath system_path;
        BuildInfo build_info;
-       bool prepared;
+       bool prepared = false;
        std::vector<std::string> problems;
 
        Tool(Builder &, const std::string &);
        Tool(Builder &, const Architecture &, const std::string &);
+private:
+       Tool(Builder &, const Architecture *, const std::string &);
 public:
        virtual ~Tool() { }
 
        const std::string &get_tag() const { return tag; }
 
-       /** Returns the architecture this tool build for.  May return null if the
+       /** Returns the architecture this tool builds for.  May return null if the
        tool is architecture-agnostic. */
        const Architecture *get_architecture() const { return architecture; }