aboutsummaryrefslogtreecommitdiff
path: root/cores
diff options
context:
space:
mode:
Diffstat (limited to 'cores')
-rw-r--r--cores/arduino/WString.cpp4
-rw-r--r--cores/arduino/WString.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/cores/arduino/WString.cpp b/cores/arduino/WString.cpp
index e462bee..63af6d3 100644
--- a/cores/arduino/WString.cpp
+++ b/cores/arduino/WString.cpp
@@ -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];
diff --git a/cores/arduino/WString.h b/cores/arduino/WString.h
index f801f63..7402430 100644
--- a/cores/arduino/WString.h
+++ b/cores/arduino/WString.h
@@ -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
@@ -113,7 +113,7 @@ public:
String & operator += (const String &rhs) {concat(rhs); return (*this);}
String & operator += (const char *cstr) {concat(cstr); return (*this);}
String & operator += (char c) {concat(c); return (*this);}
- String & operator += (unsigned char num) {concat(num); return (*this);}
+ String & operator += (unsigned char num) {concat(num); return (*this);}
String & operator += (int num) {concat(num); return (*this);}
String & operator += (unsigned int num) {concat(num); return (*this);}
String & operator += (long num) {concat(num); return (*this);}