mirror of https://github.com/MLXXXp/Arduboy2.git
Make 'writeUnitName' const-correct
Without this, an attempt to pass a string literal or an array of `const` `char` as an argument will create a warning: * `warning: invalid conversion from 'const char*' to 'char*' [-fpermissive]` * `warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]` In a standard C++ environment, these warnings would be compiler errors.
This commit is contained in:
parent
3f9e86ab99
commit
93adfa41f5
|
@ -1096,7 +1096,7 @@ uint8_t Arduboy2Base::readUnitName(char* name)
|
|||
return dest;
|
||||
}
|
||||
|
||||
void Arduboy2Base::writeUnitName(char* name)
|
||||
void Arduboy2Base::writeUnitName(const char* name)
|
||||
{
|
||||
bool done = false;
|
||||
uint8_t dest = EEPROM_UNIT_NAME;
|
||||
|
|
|
@ -1169,7 +1169,7 @@ class Arduboy2Base : public Arduboy2Core
|
|||
*
|
||||
* \see readUnitName() writeUnitID() Arduboy2::bootLogoExtra()
|
||||
*/
|
||||
void writeUnitName(char* name);
|
||||
void writeUnitName(const char* name);
|
||||
|
||||
/** \brief
|
||||
* Read the "Show Boot Logo" flag in system EEPROM.
|
||||
|
|
Loading…
Reference in New Issue