Closed GoogleCodeExporter closed 9 years ago
This patch makes Stream's write(const char *str) non-vitual.
Original comment by paul.sto...@gmail.com
on 28 Aug 2011 at 6:56
Attachments:
This patch makes Stream's write(const char *str) non-vitual, and also includes
Alex Leone's suggestion to implement it inline for print(). This reduces the
CPU time for string constants, but it results in slightly larger code size when
I tested on the Ethernet Webserver example.
Original comment by paul.sto...@gmail.com
on 28 Aug 2011 at 7:00
Attachments:
Thanks!
Do you have a recommendation for which version of the patch to use?
Original comment by dmel...@gmail.com
on 28 Aug 2011 at 7:17
The smaller patch is safest. The larger patch only adds optimization, not API
changes. With 1.0 so close, I would personally go with only the API change for
now and consider the optimization later.
Original comment by paul.sto...@gmail.com
on 29 Aug 2011 at 8:59
This ended up being a bit more complicated. I needed to add using
Print::Write; various places to be able to still call the write(char *) version
of the function. Also, the Ethernet class names had changed. Also, Wire
implemented multi-byte write, too. So you might want to take a look at the
commit and see if it looks sane or not.
https://github.com/arduino/Arduino/commit/7d8d20894c7420ad2fea81d80b660758064761
79
Original comment by dmel...@gmail.com
on 7 Sep 2011 at 10:43
Original issue reported on code.google.com by
paul.sto...@gmail.com
on 28 Aug 2011 at 6:53