mirror of
https://github.com/kevinbentley/Descent3.git
synced 2026-04-05 23:00:03 -04:00
Add "final" marker to a number of classes
Devirtualization is an optimization in the generated assembly: when a class C is polymorphic but also final, ``((C *)ptr)->func()`` can be turned from an indirect into a static call.
This commit is contained in:
@@ -69,7 +69,7 @@ struct tShieldOrbInfo {
|
||||
//------------------
|
||||
// Shield orb script
|
||||
//------------------
|
||||
class ShieldOrb : public BaseObjScript {
|
||||
class ShieldOrb final : public BaseObjScript {
|
||||
public:
|
||||
ShieldOrb() { info = NULL; }
|
||||
int16_t CallEvent(int event, tOSIRISEventInfo *data);
|
||||
@@ -81,7 +81,7 @@ private:
|
||||
//------------------
|
||||
// Energy orb script
|
||||
//------------------
|
||||
class EnergyOrb : public BaseObjScript {
|
||||
class EnergyOrb final : public BaseObjScript {
|
||||
public:
|
||||
int16_t CallEvent(int event, tOSIRISEventInfo *data);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user