1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

remove as casts for basic types

This commit is contained in:
Alexander Medvednikov
2020-02-07 22:10:48 +01:00
parent f782388148
commit d66bc24e7f
8 changed files with 63 additions and 82 deletions

View File

@ -6,7 +6,7 @@ module builtin
#include <float.h>
pub fn (d f64) str() string {
buf := malloc(sizeof(double) * 5 + 1) // TODO
C.sprintf(buf as charptr, '%f', d)
C.sprintf(charptr(buf), '%f', d)
return tos(buf, vstrlen(buf))
}