Merge pull request #20 from jrcutler/master

Make "get" methods const
This commit is contained in:
Tony DiCola 2014-09-21 18:07:21 -07:00
commit dfa6443895
2 changed files with 6 additions and 7 deletions

View File

@ -467,7 +467,7 @@ void Adafruit_GFX::setTextWrap(boolean w) {
wrap = w;
}
uint8_t Adafruit_GFX::getRotation(void) {
uint8_t Adafruit_GFX::getRotation(void) const {
return rotation;
}
@ -488,11 +488,11 @@ void Adafruit_GFX::setRotation(uint8_t x) {
}
// Return the size of the display (per current rotation)
int16_t Adafruit_GFX::width(void) {
int16_t Adafruit_GFX::width(void) const {
return _width;
}
int16_t Adafruit_GFX::height(void) {
int16_t Adafruit_GFX::height(void) const {
return _height;
}

View File

@ -65,11 +65,10 @@ class Adafruit_GFX : public Print {
virtual void write(uint8_t);
#endif
int16_t
height(void),
width(void);
int16_t height(void) const;
int16_t width(void) const;
uint8_t getRotation(void);
uint8_t getRotation(void) const;
protected:
const int16_t