Skip to content

Commit d351ce5

Browse files
committed
define pgm_read_glyph_ptr() and pgm_read_pointer() as static
functions defined in header file (.h) must be defined as static, oherwise there could a situations when linker fails with 'multiple definition' error'
1 parent f46e822 commit d351ce5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Arduino_GFX.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
#endif
139139

140140
#if !defined(ATTINY_CORE)
141-
GFX_INLINE GFXglyph *pgm_read_glyph_ptr(const GFXfont *gfxFont, uint8_t c)
141+
GFX_INLINE static GFXglyph *pgm_read_glyph_ptr(const GFXfont *gfxFont, uint8_t c)
142142
{
143143
#ifdef __AVR__
144144
return &(((GFXglyph *)pgm_read_pointer(&gfxFont->glyph))[c]);
@@ -150,7 +150,7 @@ GFX_INLINE GFXglyph *pgm_read_glyph_ptr(const GFXfont *gfxFont, uint8_t c)
150150
#endif //__AVR__
151151
}
152152

153-
GFX_INLINE uint8_t *pgm_read_bitmap_ptr(const GFXfont *gfxFont)
153+
GFX_INLINE static uint8_t *pgm_read_bitmap_ptr(const GFXfont *gfxFont)
154154
{
155155
#ifdef __AVR__
156156
return (uint8_t *)pgm_read_pointer(&gfxFont->bitmap);

0 commit comments

Comments
 (0)