MTROPOLIS: Fix missing linkInternalReferences and visitInternalReferences in SaveAndRestoreModifier

This commit is contained in:
elasota 2024-07-04 15:38:01 -04:00
parent e212224d1f
commit 9d16f99f1b
2 changed files with 16 additions and 0 deletions
engines/mtropolis

@ -451,6 +451,18 @@ VThreadState SaveAndRestoreModifier::consumeMessage(Runtime *runtime, const Comm
return kVThreadError; return kVThreadError;
} }
void SaveAndRestoreModifier::linkInternalReferences(ObjectLinkingScope *scope) {
Modifier::linkInternalReferences(scope);
_saveOrRestoreValue.linkInternalReferences(scope);
}
void SaveAndRestoreModifier::visitInternalReferences(IStructuralReferenceVisitor *visitor) {
Modifier::visitInternalReferences(visitor);
_saveOrRestoreValue.visitInternalReferences(visitor);
}
Common::SharedPtr<Modifier> SaveAndRestoreModifier::shallowClone() const { Common::SharedPtr<Modifier> SaveAndRestoreModifier::shallowClone() const {
return Common::SharedPtr<Modifier>(new SaveAndRestoreModifier(*this)); return Common::SharedPtr<Modifier>(new SaveAndRestoreModifier(*this));
} }

@ -194,6 +194,10 @@ public:
SupportStatus debugGetSupportStatus() const override { return kSupportStatusDone; } SupportStatus debugGetSupportStatus() const override { return kSupportStatusDone; }
#endif #endif
protected:
void linkInternalReferences(ObjectLinkingScope *scope) override;
void visitInternalReferences(IStructuralReferenceVisitor *visitor) override;
private: private:
Common::SharedPtr<Modifier> shallowClone() const override; Common::SharedPtr<Modifier> shallowClone() const override;
const char *getDefaultName() const override; const char *getDefaultName() const override;