Skip to content

Made swap a function to prevent awful error messages from macros. #2434

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

Closed
wants to merge 1 commit into from

Conversation

Chobbes
Copy link

@Chobbes Chobbes commented Nov 10, 2014

This macro causes a lot of grief for poor students who aren't yet familiar with gcc's dreadful error messages. Unfortunately "swap" is a common name for functions, and if people aren't careful and declare their own functions when including Adafruit_GFX.h you get a misleading error, as opposed to a duplicate declaration one.

@matthijskooijman matthijskooijman added Library: Other Arduino libraries that don't have their own label feature request A request to make an enhancement (not a bug fix) labels Nov 10, 2014
@cmaglie cmaglie added Component: Core Related to the code for the standard Arduino API and removed Library: Other Arduino libraries that don't have their own label labels Apr 15, 2015
@facchinm facchinm added Board: Arduino Robot Applies only to the Arduino Robot Library: TFT The TFT Arduino library and removed Component: Core Related to the code for the standard Arduino API labels Nov 13, 2017
@facchinm
Copy link
Member

@cmaglie should we apply this to Robot_control and TFT repos even if they are in maintenance mode?

@cmaglie
Copy link
Member

cmaglie commented Sep 17, 2019

I'd say yes.

@Chobbes
Copy link
Author

Chobbes commented Sep 17, 2019

👍

facchinm added a commit to arduino-libraries/TFT that referenced this pull request Sep 17, 2019
facchinm added a commit to arduino-libraries/Robot_Control that referenced this pull request Sep 17, 2019
@facchinm
Copy link
Member

Applied to the given repos, closing here

@facchinm facchinm closed this Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Board: Arduino Robot Applies only to the Arduino Robot feature request A request to make an enhancement (not a bug fix) Library: TFT The TFT Arduino library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants