Mark getPos as const
This commit is contained in:
parent
07fb33c2dd
commit
9daf4b373d
@ -306,7 +306,7 @@ public:
|
|||||||
std::pair< double, double > >
|
std::pair< double, double > >
|
||||||
getDoubleRect() = 0;
|
getDoubleRect() = 0;
|
||||||
virtual void setPos( double x, double y ) = 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 {
|
bool colidesWith( const RenderObject &other ) const {
|
||||||
if ( !hasCollisions() || !other.hasCollisions() || getHidden() ||
|
if ( !hasCollisions() || !other.hasCollisions() || getHidden() ||
|
||||||
other.getHidden() ) {
|
other.getHidden() ) {
|
||||||
@ -881,7 +881,7 @@ public:
|
|||||||
og_y = y;
|
og_y = y;
|
||||||
updateSizeAndPosition();
|
updateSizeAndPosition();
|
||||||
}
|
}
|
||||||
virtual std::pair< double, double > getPos() override {
|
virtual std::pair< double, double > getPos() const override {
|
||||||
return { og_x, og_y };
|
return { og_x, og_y };
|
||||||
}
|
}
|
||||||
virtual int leftmost() override {
|
virtual int leftmost() override {
|
||||||
|
Loading…
Reference in New Issue
Block a user