Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor improvements #47

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Minor improvements #47

wants to merge 4 commits into from

Conversation

aremmell
Copy link

  • Delete default constructor, so that people don't accidentally default-construct an instance which will have garbage values for all members (including CS and RST pins)
  • Implement virtual destructor (derived class). Actually, now that I think about it, Adafruit_GFX needs a virtual destructor as well. I'll submit a different PR for that
  • Provide default initialization values for members which will remain uninitialized with garbage values until begin() is called (I found out the hard way when I tried to get width and height before calling begin())
  • Remove unnecessary if-statement (an unsigned 8-bit value cannot be greater than 255, so the capping is superfluous)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant