blob: 00c2c25ce22ae2a1a18aee690cc219ef0954232f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#ifndef MBGL_UTIL_DTOA
#define MBGL_UTIL_DTOA
#include <string>
namespace mbgl {
namespace util {
char* dtoa(double value, char* buffer);
inline std::string dtoa(double value) {
std::string data;
data.resize(25);
auto end = dtoa(value, const_cast<char*>(data.data()));
data.resize(end - data.data());
return data;
}
} // end namespace util
} // end namespace mbgl
#endif
|