Skip to content

Commit

Permalink
Merge pull request ninja-build#441 from tfarina/missing-virtual
Browse files Browse the repository at this point in the history
Add missing 'virtual' annotation to ReadFile() override.
  • Loading branch information
evmar committed Oct 17, 2012
2 parents fbe98f9 + a35bd36 commit b022e78
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions src/metrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,10 @@ struct Metrics {
/// Epoch varies between platforms; only useful for measuring elapsed time.
int64_t GetTimeMillis();


/// A simple stopwatch which returns the time
/// in seconds since Restart() was called.
class Stopwatch
{
public:
class Stopwatch {
public:
Stopwatch() : started_(0) {}

/// Seconds since Restart() call.
Expand All @@ -80,7 +78,6 @@ class Stopwatch
uint64_t Now() const;
};


/// The primary interface to metrics. Use METRIC_RECORD("foobar") at the top
/// of a function to get timing stats recorded for each call of the function.
#define METRIC_RECORD(name) \
Expand Down
2 changes: 1 addition & 1 deletion src/ninja.cc
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ int GuessParallelism() {
/// An implementation of ManifestParser::FileReader that actually reads
/// the file.
struct RealFileReader : public ManifestParser::FileReader {
bool ReadFile(const string& path, string* content, string* err) {
virtual bool ReadFile(const string& path, string* content, string* err) {
return ::ReadFile(path, content, err) == 0;
}
};
Expand Down

0 comments on commit b022e78

Please sign in to comment.