More cleanup

This commit is contained in:
2025-09-14 20:17:42 -04:00
parent f39149d516
commit 147edf5c93
16 changed files with 115 additions and 134 deletions

View File

@@ -28,14 +28,14 @@ struct Base {
virtual int get_value() const { return base_value; }
};
struct Derived : public Base {
struct Derived : Base {
int derived_value;
explicit Derived(int base_v, int derived_v)
: Base(base_v), derived_value(derived_v) {}
int get_value() const override { return base_value + derived_value; }
};
struct AnotherDerived : public Base {
struct AnotherDerived : Base {
int another_value;
explicit AnotherDerived(int base_v, int another_v)
: Base(base_v), another_value(another_v) {}
@@ -56,7 +56,7 @@ struct Interface2 {
};
// Multiple inheritance - this will cause pointer address changes
struct MultipleInheritance : public Interface1, public Interface2 {
struct MultipleInheritance : Interface1, Interface2 {
int own_data;
explicit MultipleInheritance(int data) : own_data(data) {}
int get_own_data() const { return own_data; }