lasselukkari / aWOT

Arduino web server library.
MIT License
283 stars 41 forks source link

Switch to using Arduino F strings for almost everything #109

Closed EmperorArthur closed 3 years ago

EmperorArthur commented 3 years ago

This saves some RAM by wrapping a few internal uses of raw C strings.

The other major change is using them and the built in print statement to simplify the code.

Arduino F strings are merely a fancy wrapper around the "PSTR" macro to be able to recognize flash strings.

class __FlashStringHelper;
#define F(string_literal) (reinterpret_cast<const __FlashStringHelper *>(PSTR(string_literal)))