mirror of https://github.com/stella-emu/stella.git
Match override to virtual method, to stop compiler from complaining.
Also, if we don't know if a method should be const, then it needs to be :)
This commit is contained in:
parent
988b36010b
commit
4a8ff43fe2
|
@ -30,16 +30,14 @@
|
|||
class PlayfieldPositionProvider
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
Get the current x value
|
||||
*/
|
||||
virtual uInt8 getPosition() = 0;
|
||||
virtual uInt8 getPosition() const = 0;
|
||||
|
||||
protected:
|
||||
|
||||
~PlayfieldPositionProvider() = default;
|
||||
|
||||
};
|
||||
|
||||
#endif // TIA_POSITIONING_PROVIDER
|
||||
#endif // TIA_POSITIONING_PROVIDER
|
||||
|
|
|
@ -317,7 +317,9 @@ class TIA : public Device, public PlayfieldPositionProvider
|
|||
/**
|
||||
Get the current x value
|
||||
*/
|
||||
virtual uInt8 getPosition() {return (myHctr < 68) ? 0 : (myHctr - 68 - myXDelta);}
|
||||
uInt8 getPosition() const override {
|
||||
return (myHctr < 68) ? 0 : (myHctr - 68 - myXDelta);
|
||||
}
|
||||
|
||||
/**
|
||||
Save the current state of this device to the given Serializer.
|
||||
|
|
Loading…
Reference in New Issue