Skip to content

Commit 4b7d399

Browse files
authored
Merge pull request #2486 from digit-google/remove-warnings
Remove warnings
2 parents f220dc5 + 50ae55a commit 4b7d399

File tree

4 files changed

+18
-33
lines changed

4 files changed

+18
-33
lines changed

src/build.cc

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,10 @@ namespace {
4848

4949
/// A CommandRunner that doesn't actually run the commands.
5050
struct DryRunCommandRunner : public CommandRunner {
51-
virtual ~DryRunCommandRunner() {}
52-
5351
// Overridden from CommandRunner:
54-
virtual size_t CanRunMore() const;
55-
virtual bool StartCommand(Edge* edge);
56-
virtual bool WaitForCommand(Result* result);
52+
size_t CanRunMore() const override;
53+
bool StartCommand(Edge* edge) override;
54+
bool WaitForCommand(Result* result) override;
5755

5856
private:
5957
queue<Edge*> finished_;
@@ -595,12 +593,11 @@ void Plan::Dump() const {
595593

596594
struct RealCommandRunner : public CommandRunner {
597595
explicit RealCommandRunner(const BuildConfig& config) : config_(config) {}
598-
virtual ~RealCommandRunner() {}
599-
virtual size_t CanRunMore() const;
600-
virtual bool StartCommand(Edge* edge);
601-
virtual bool WaitForCommand(Result* result);
602-
virtual vector<Edge*> GetActiveEdges();
603-
virtual void Abort();
596+
size_t CanRunMore() const override;
597+
bool StartCommand(Edge* edge) override;
598+
bool WaitForCommand(Result* result) override;
599+
vector<Edge*> GetActiveEdges() override;
600+
void Abort() override;
604601

605602
const BuildConfig& config_;
606603
SubprocessSet subprocs_;

src/explanations.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ struct Explanations {
5353
}
5454

5555
private:
56-
bool enabled_ = false;
5756
std::unordered_map<const void*, std::vector<std::string>> map_;
5857
};
5958

src/metrics.cc

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,6 @@ int64_t HighResTimer() {
3737
.count();
3838
}
3939

40-
constexpr int64_t GetFrequency() {
41-
// If numerator isn't 1 then we lose precision and that will need to be
42-
// assessed.
43-
static_assert(std::chrono::steady_clock::period::num == 1,
44-
"Numerator must be 1");
45-
return std::chrono::steady_clock::period::den /
46-
std::chrono::steady_clock::period::num;
47-
}
48-
4940
int64_t TimerToMicros(int64_t dt) {
5041
// dt is in ticks. We want microseconds.
5142
return chrono::duration_cast<chrono::microseconds>(

src/status_printer.h

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,19 @@ struct StatusPrinter : Status {
2626
explicit StatusPrinter(const BuildConfig& config);
2727

2828
/// Callbacks for the Plan to notify us about adding/removing Edge's.
29-
virtual void EdgeAddedToPlan(const Edge* edge);
30-
virtual void EdgeRemovedFromPlan(const Edge* edge);
29+
void EdgeAddedToPlan(const Edge* edge) override;
30+
void EdgeRemovedFromPlan(const Edge* edge) override;
3131

32-
virtual void BuildEdgeStarted(const Edge* edge, int64_t start_time_millis);
33-
virtual void BuildEdgeFinished(Edge* edge, int64_t start_time_millis,
32+
void BuildEdgeStarted(const Edge* edge, int64_t start_time_millis) override;
33+
void BuildEdgeFinished(Edge* edge, int64_t start_time_millis,
3434
int64_t end_time_millis, bool success,
35-
const std::string& output);
36-
virtual void BuildStarted();
37-
virtual void BuildFinished();
35+
const std::string& output) override;
36+
void BuildStarted() override;
37+
void BuildFinished() override;
3838

39-
virtual void Info(const char* msg, ...);
40-
virtual void Warning(const char* msg, ...);
41-
virtual void Error(const char* msg, ...);
42-
43-
virtual ~StatusPrinter() {}
39+
void Info(const char* msg, ...) override;
40+
void Warning(const char* msg, ...) override;
41+
void Error(const char* msg, ...) override;
4442

4543
/// Format the progress status string by replacing the placeholders.
4644
/// See the user manual for more information about the available

0 commit comments

Comments
 (0)