Skip to content

Commit

Permalink
Fixed string constructor overloading bug
Browse files Browse the repository at this point in the history
  • Loading branch information
majenkotech committed Apr 1, 2014
1 parent 962d6d1 commit 5bc28a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions hardware/arduino/cores/arduino/WString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
4 changes: 2 additions & 2 deletions hardware/arduino/cores/arduino/WString.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ class String
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
Expand Down

0 comments on commit 5bc28a1

Please sign in to comment.