[core] Avoid public dtoa.hpp include
This commit is contained in:
committed by
Konstantin Käfer
parent
0be8309446
commit
3db027751e
@@ -516,6 +516,7 @@ set(MBGL_CORE_FILES
|
||||
src/mbgl/util/std.hpp
|
||||
src/mbgl/util/stopwatch.cpp
|
||||
src/mbgl/util/stopwatch.hpp
|
||||
src/mbgl/util/string.cpp
|
||||
src/mbgl/util/thread.hpp
|
||||
src/mbgl/util/thread_context.cpp
|
||||
src/mbgl/util/thread_context.hpp
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
#include <cassert>
|
||||
#include <exception>
|
||||
|
||||
#include <mbgl/util/dtoa.hpp>
|
||||
|
||||
namespace mbgl {
|
||||
namespace util {
|
||||
|
||||
@@ -22,17 +20,9 @@ inline std::string toString(uint8_t num) {
|
||||
return std::to_string(unsigned(num));
|
||||
}
|
||||
|
||||
inline std::string toString(float num) {
|
||||
return dtoa(num);
|
||||
}
|
||||
|
||||
inline std::string toString(double num) {
|
||||
return dtoa(num);
|
||||
}
|
||||
|
||||
inline std::string toString(long double num) {
|
||||
return dtoa(num);
|
||||
}
|
||||
std::string toString(float);
|
||||
std::string toString(double);
|
||||
std::string toString(long double);
|
||||
|
||||
inline std::string toString(std::exception_ptr error) {
|
||||
assert(error);
|
||||
|
||||
20
src/mbgl/util/string.cpp
Normal file
20
src/mbgl/util/string.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include <mbgl/util/string.hpp>
|
||||
#include <mbgl/util/dtoa.hpp>
|
||||
|
||||
namespace mbgl {
|
||||
namespace util {
|
||||
|
||||
std::string toString(float num) {
|
||||
return dtoa(num);
|
||||
}
|
||||
|
||||
std::string toString(double num) {
|
||||
return dtoa(num);
|
||||
}
|
||||
|
||||
std::string toString(long double num) {
|
||||
return dtoa(num);
|
||||
}
|
||||
|
||||
} // namespace util
|
||||
} // namespace mbgl
|
||||
Reference in New Issue
Block a user