Use override instead of virtual

This commit is contained in:
Alexander Grund 2026-07-05 12:23:22 +02:00
parent cb9e7e226b
commit 1c168d57fb
No known key found for this signature in database
GPG key ID: AA48A0760367A42B
8 changed files with 36 additions and 36 deletions

View file

@ -24,7 +24,7 @@ namespace limitations_const_parameter_warning_explanation {
class derived : public base
{
public:
virtual void method(const int);
void method(const int) override;
};
void derived::method(int) {}
@ -35,7 +35,7 @@ namespace {
//[ limitations_const_parameter_warning_solution
MOCK_BASE_CLASS(mock_base, base)
{
void method(const int i) { method_stub(i); }
void method(const int i) override { method_stub(i); }
MOCK_METHOD(method_stub, 1, void(int), method)
};
//]