}
struct RealCommandRunner : public CommandRunner {
- RealCommandRunner(const BuildConfig& config) : config_(config) {}
+ explicit RealCommandRunner(const BuildConfig& config) : config_(config) {}
virtual ~RealCommandRunner() {}
virtual bool CanRunMore();
virtual bool StartCommand(Edge* edge);
/// Tracks the status of a build: completion fraction, printing updates.
struct BuildStatus {
- BuildStatus(const BuildConfig& config);
+ explicit BuildStatus(const BuildConfig& config);
void PlanHasTotalEdges(int total);
void BuildEdgeStarted(Edge* edge);
void BuildEdgeFinished(Edge* edge, bool success, const string& output,
/// An Env for an Edge, providing $in and $out.
struct EdgeEnv : public Env {
- EdgeEnv(Edge* edge) : edge_(edge) {}
+ explicit EdgeEnv(Edge* edge) : edge_(edge) {}
virtual string LookupVariable(const string& var);
/// Given a span of Nodes, construct a list of paths suitable for a command
/// Information about a node in the dependency graph: the file, whether
/// it's dirty, mtime, etc.
struct Node {
- Node(const string& path) : path_(path), mtime_(-1), dirty_(false),
- in_edge_(NULL) {}
+ explicit Node(const string& path)
+ : path_(path),
+ mtime_(-1),
+ dirty_(false),
+ in_edge_(NULL) {}
/// Return true if the file exists (mtime_ got a value).
bool Stat(DiskInterface* disk_interface);
/// An invokable build command and associated metadata (description, etc.).
struct Rule {
- Rule(const string& name) : name_(name), generator_(false), restat_(false) { }
+ explicit Rule(const string& name)
+ : name_(name), generator_(false), restat_(false) {}
const string& name() const { return name_; }