mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-01 12:24:14 +01:00
Fixed string constructor overloading bug
This commit is contained in:
parent
962d6d1e3a
commit
5bc28a178f
@ -100,14 +100,14 @@ String::String(unsigned long value, unsigned char base)
|
||||
*this = buf;
|
||||
}
|
||||
|
||||
String::String(float value, int decimalPlaces)
|
||||
String::String(float value, unsigned char decimalPlaces)
|
||||
{
|
||||
init();
|
||||
char buf[33];
|
||||
*this = dtostrf(value, (decimalPlaces + 2), decimalPlaces, buf);
|
||||
}
|
||||
|
||||
String::String(double value, int decimalPlaces)
|
||||
String::String(double value, unsigned char decimalPlaces)
|
||||
{
|
||||
init();
|
||||
char buf[33];
|
||||
|
@ -68,8 +68,8 @@ public:
|
||||
explicit String(unsigned int, unsigned char base=10);
|
||||
explicit String(long, unsigned char base=10);
|
||||
explicit String(unsigned long, unsigned char base=10);
|
||||
explicit String(float, int decimalPlaces=6);
|
||||
explicit String(double, int decimalPlaces=6);
|
||||
explicit String(float, unsigned char decimalPlaces=6);
|
||||
explicit String(double, unsigned char decimalPlaces=6);
|
||||
~String(void);
|
||||
|
||||
// memory management
|
||||
|
Loading…
Reference in New Issue
Block a user