Closed robertfchapman closed 9 months ago
Why do you feel "bool" isn't portable?
I may be being a bit pedantic. As I understand, bool is evaluated to int by most compilers which may be more than one byte. When I do use the data type bool, I specifically use the keywords "true" and "false" or "TRUE" and "FALSE" and not 0 and 1, as 0.1 will evaluate to true. On some micro controllers that I have worked with in the past, the compiler & IDE environment didn't deal well with bool types without specifying an include of bool.h or other workarounds which may or may not have been readily available. Some of the projects that I have worked on required going back to very old environments/architectures to add newer functionality. Many of these are in C and not C++ and depending on the compiler would not handle bool.
I would say that today's architectures and environments may be a bit more forgiving and may be a non issue.
Going to consider this a non-issue, as the library is C++ and bool is definitely standard in all C++ versions.
Changed OneWire::write_bytes power from "bool" to "uint8_t" for better portability