Using the function atoi() pulls in a dependency from newlib, which in turn pulls in locale support, and locale support requires about 350 bytes of RAM. This patch removes such a dependency by rewriting the MicroBitImage parsing code so that it directly converts the input string to an integer instead of building a buffer and passing it to atoi(). This patch saves about 640 bytes of code space and 364 bytes of RAM. It also reduces the amount of stack space used by the MicroBitImage constructor.master
parent
e0f8b005fe
commit
fbfee4930a
Loading…
Reference in new issue