- more memory cleanup

This commit is contained in:
Mark Vejvoda
2010-09-07 21:01:22 +00:00
parent 63cf199322
commit 958184e018
12 changed files with 118 additions and 31 deletions

View File

@@ -105,25 +105,25 @@ string boolToStr(bool b){
}
string intToStr(int i){
char str[strSize];
char str[strSize]="";
sprintf(str, "%d", i);
return str;
}
string intToHex(int i){
char str[strSize];
char str[strSize]="";
sprintf(str, "%x", i);
return str;
}
string floatToStr(float f,int precsion){
char str[strSize];
char str[strSize]="";
sprintf(str, "%.*f", precsion,f);
return str;
}
string doubleToStr(double d,int precsion){
char str[strSize];
char str[strSize]="";
sprintf(str, "%.*f", precsion,d);
return str;
}