bugfix (cxx)!: added missing explicit for some strong value types

BREAKING CHANGE: Users who have been using the GPIO and SPI classes
                 may need to revisit their code as it's now not allowed
                 anymore to pass raw numbers for classes like MOSI
                 or GPIONum.
This commit is contained in:
Jakob Hasse
2021-11-19 16:07:32 +08:00
parent 2ee3c7b542
commit ce7cdeffb4
2 changed files with 5 additions and 5 deletions

View File

@@ -57,7 +57,7 @@ public:
*
* @throw SPIException if the passed SPI host number is incorrect.
*/
SPINum(uint32_t host_id_raw) : StrongValueComparable<uint32_t>(host_id_raw)
explicit SPINum(uint32_t host_id_raw) : StrongValueComparable<uint32_t>(host_id_raw)
{
esp_err_t spi_num_check_result = check_spi_num(host_id_raw);
if (spi_num_check_result != ESP_OK) {