Mark getPos as const

This commit is contained in:
zvon 2020-08-24 16:33:53 +02:00
parent 07fb33c2dd
commit 9daf4b373d

View File

@ -306,7 +306,7 @@ public:
std::pair< double, double > >
getDoubleRect() = 0;
virtual void setPos( double x, double y ) = 0;
virtual std::pair< double, double > getPos() = 0;
virtual std::pair< double, double > getPos() const = 0;
bool colidesWith( const RenderObject &other ) const {
if ( !hasCollisions() || !other.hasCollisions() || getHidden() ||
other.getHidden() ) {
@ -881,7 +881,7 @@ public:
og_y = y;
updateSizeAndPosition();
}
virtual std::pair< double, double > getPos() override {
virtual std::pair< double, double > getPos() const override {
return { og_x, og_y };
}
virtual int leftmost() override {