mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-20 14:54:31 +01:00
Fixed String class regression after f80c6c5f35cddcf4761a3c97feb8504425e9d27d
This should make explicit String-from-integer constructor working again: int a = 10; String(a, 4);
This commit is contained in:
parent
2ebd47ab53
commit
c86eed942d
@ -106,14 +106,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];
|
||||
|
@ -69,8 +69,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=2);
|
||||
explicit String(double, int decimalPlaces=2);
|
||||
explicit String(float, unsigned char decimalPlaces=2);
|
||||
explicit String(double, unsigned char decimalPlaces=2);
|
||||
~String(void);
|
||||
|
||||
// memory management
|
||||
|
@ -107,14 +107,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];
|
||||
|
@ -69,8 +69,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=2);
|
||||
explicit String(double, int decimalPlaces=2);
|
||||
explicit String(float, unsigned char decimalPlaces=2);
|
||||
explicit String(double, unsigned char decimalPlaces=2);
|
||||
~String(void);
|
||||
|
||||
// memory management
|
||||
|
Loading…
x
Reference in New Issue
Block a user