Design-Patterns-GoF icon indicating copy to clipboard operation
Design-Patterns-GoF copied to clipboard

GlyphFactory.cpp:20:22: error: array subscript has type 'char' [-Werror=char-subscripts]

Open franz-ms-muc opened this issue 4 years ago • 4 comments

GlyphFactory.cpp:20:22: error: array subscript has type 'char' [-Werror=char-subscripts]

char is signed on some machines. 

a Subscript of an Array is defined unsigned in C (0....n)

franz-ms-muc avatar Nov 19 '21 06:11 franz-ms-muc

https://github.com/Meisterschulen-am-Ostbahnhof-Munchen/Design-Patterns-GoF-on-ESP32/blob/feature/1/Structural_Patterns/Flyweight/components/Flyweight_component/GlyphFactory.cpp

here i will correct it so it runs in ESP32. please Double check it before take over to your Repo, because i do not check if it is running on PC !

franz-ms-muc avatar Nov 19 '21 06:11 franz-ms-muc

same Story for the delete[]. there is no new[]. so delete[] is wrong. 

https://stackoverflow.com/questions/2425728/delete-vs-delete-operators-in-c

franz-ms-muc avatar Nov 19 '21 07:11 franz-ms-muc