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:
Stephen Anthony 2017-03-29 19:59:01 -02:30
parent 988b36010b
commit 4a8ff43fe2
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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.