diff --git a/sdlpp.hpp b/sdlpp.hpp index 97be992..aee0531 100644 --- a/sdlpp.hpp +++ b/sdlpp.hpp @@ -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 {