summaryrefslogtreecommitdiff
path: root/include/mbgl/util/string.hpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2018-10-17 15:52:11 +0200
committerKonstantin Käfer <mail@kkaefer.com>2018-10-23 12:23:40 +0200
commit43687b4781cdcd7c4e299dc625263bc3982a529f (patch)
treeacf8fe6ee82aee548402af7d8b8b6074c30f7fa1 /include/mbgl/util/string.hpp
parentdecbde16165cf3e4455edd0c5caeac991d0c01e6 (diff)
downloadqtlocation-mapboxgl-43687b4781cdcd7c4e299dc625263bc3982a529f.tar.gz
[core] add ability to stringify doubles that are integer with and without trailing ".0"
Diffstat (limited to 'include/mbgl/util/string.hpp')
-rw-r--r--include/mbgl/util/string.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/mbgl/util/string.hpp b/include/mbgl/util/string.hpp
index 13498ccb92..1cca386e21 100644
--- a/include/mbgl/util/string.hpp
+++ b/include/mbgl/util/string.hpp
@@ -49,9 +49,9 @@ inline std::string toString(uint8_t num) {
return std::to_string(unsigned(num));
}
-std::string toString(float);
-std::string toString(double);
-std::string toString(long double);
+std::string toString(float, bool decimal = false);
+std::string toString(double, bool decimal = false);
+std::string toString(long double, bool decimal = false);
inline std::string toString(std::exception_ptr error) {
assert(error);