-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[workspace] Patch googlebenchmark to avoid shadow warnings
This allows us to remove copy-pasta in every benchmark we write.
- Loading branch information
1 parent
4aa538d
commit c01a517
Showing
8 changed files
with
25 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
tools/workspace/googlebenchmark/patches/remove_overloaded_fixture_set_up.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Avoid GCC warnings about overloaded virtuals | ||
|
||
We only need the mutable spelling for Drake code. | ||
|
||
--- include/benchmark/benchmark.h | ||
+++ include/benchmark/benchmark.h | ||
@@ -1425,12 +1425,8 @@ | ||
this->TearDown(st); | ||
} | ||
|
||
- // These will be deprecated ... | ||
- virtual void SetUp(const State&) {} | ||
- virtual void TearDown(const State&) {} | ||
- // ... In favor of these. | ||
- virtual void SetUp(State& st) { SetUp(const_cast<const State&>(st)); } | ||
- virtual void TearDown(State& st) { TearDown(const_cast<const State&>(st)); } | ||
+ virtual void SetUp(State&) {} | ||
+ virtual void TearDown(State&) {} | ||
|
||
protected: | ||
virtual void BenchmarkCase(State&) = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters