moononournation / Arduino_GFX

Arduino GFX developing for various color displays and various data bus interfaces
Other
760 stars 151 forks source link

Prevent overriding of '#define INLINE' #484

Closed vortigont closed 3 weeks ago

vortigont commented 1 month ago

'#define INLINE' is used frequently in other libs, unprotected override results in tons on compiler warnings like this: warning: "INLINE" redefined

This PR will protect it with #ifndef guard and prevent warnings in case global INLINE is defined

moononournation commented 1 month ago

That does not fully fix the conflict, is it better if rename it to e.g. GFX_INLINE?

vortigont commented 1 month ago

yes, it's not there to fix the conflict but, probably user could use same definition in different libs, but it's could turn into unexpected result. Renaming it to some more unique GFX_INLINE would definitely be a better option.