mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 07:03:25 +00:00
Adds const version of rev_bar method
Adds a const overload for the `rev_bar` virtual method. This allows calling the method on const instances of the reverse engineered class.
This commit is contained in:
@@ -34,6 +34,10 @@ public:
|
||||
{
|
||||
return call_virtual_method<1, int>();
|
||||
}
|
||||
[[nodiscard]] int rev_bar_const() const
|
||||
{
|
||||
return call_virtual_method<1, int>();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -47,4 +51,5 @@ TEST(unit_test_reverse_enineering, read_test)
|
||||
|
||||
EXPECT_EQ(player_original.bar(), player_reversed->rev_bar());
|
||||
EXPECT_EQ(player_original.foo(), player_reversed->rev_foo());
|
||||
EXPECT_EQ(player_original.bar(), player_reversed->rev_bar_const());
|
||||
}
|
||||
Reference in New Issue
Block a user