Clean up use of "byte" as a type. uint8_t or (C++17) std::byte are better#8090
Clean up use of "byte" as a type. uint8_t or (C++17) std::byte are better#8090d-a-v merged 2 commits intoesp8266:masterfrom
Conversation
earlephilhower
left a comment
There was a problem hiding this comment.
Not a fan of the way Arduino did it, but this breaks Arduino compatibility.
uint16_t makeWord(uint16_t w);
uint16_t makeWord(byte h, byte l);
Removing byte elsewhere seems fine, but the 2-param makeword seems like it should be moved from unsigned char to byte in WMath.cpp.
|
In the light of even, say: using lets the compiler cast and then link just fine. My reckoning in this is to get rid of "byte" as much as possible - rationale (byte is used as object ident) was given above. By the way, I messed up, doing the ESP32 in kind of at the same time, and didn't fix the return type inconsistency here in ESP8266 Core. I have done that now (fixup and rebase). There are other indications that this discussion is moot, like (AVR Arduino.h to ESP8266's): and the AVR |
1f3a19b to
8b48530
Compare
|
Regarding Arduino compatibility: https://github.com/arduino/ArduinoCore-API |
a5b8112 to
c00faa0
Compare
Change byte to uint8_t to cope with breaking change in 3.2.0 of platform: esp8266/Arduino#8090
Related to #8089