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:
@ -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))
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user