Skip to content

Conversation

@biojppm
Copy link
Contributor

@biojppm biojppm commented Aug 31, 2016

This allows write-access to the State argument, which is important in upcoming user-defined counter functionality.

This allows write-access to the State variable, which is important in
upcoming user-defined counter functionality.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.05%) to 87.669% when pulling b7b8c9a on biojppm:fixture into 61f570e on google:master.

@AppVeyorBot
Copy link

Build benchmark 403 completed (commit 593e40b416 by @jppm)

virtual void SetUp(const State&) {}
virtual void TearDown(const State&) {}
// ... In favor of these.
virtual void SetUp(State& st) { SetUp(static_cast<State const&>(st)); }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please be consistent wrt the placement of const. This library generally puts it before the type name. (I am in the "after the type name" camp, but consistency trumps.)

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 87.73% when pulling b8d1424 on biojppm:fixture into 61f570e on google:master.

@AppVeyorBot
Copy link

Build benchmark 405 completed (commit 99e137a332 by @jppm)

virtual void SetUp(const State&) {}
virtual void TearDown(const State&) {}
// ... In favor of these.
virtual void SetUp(State& st) { SetUp(static_cast<const State&>(st)); }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const_cast, probably.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah this should be static_cast. const_cast is for removing const.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gah, completely read it wrong. i thought it was the other way around (with the old ones forwarding to the new ones)

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.05%) to 87.669% when pulling 1f86241 on biojppm:fixture into 61f570e on google:master.

@AppVeyorBot
Copy link

Build benchmark 407 completed (commit 44c8fdda78 by @jppm)

@dmah42 dmah42 merged commit 6a28f1e into google:master Sep 1, 2016
@biojppm biojppm deleted the fixture branch March 1, 2017 23:40
FantasqueX added a commit to FantasqueX/benchmark that referenced this pull request Dec 28, 2023
dmah42 added a commit that referenced this pull request Jan 5, 2024
Const SetUp and TearDown were deprecated in #285

Co-authored-by: dominic <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants