Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Use rapidjson's dtoa implementation to stringify floats - #5054

Merged
kkaefer merged 1 commit into
masterfrom
js-number-format-998
May 18, 2016
Merged

kkaefer merged 1 commit into
masterfrom
js-number-format-998

Conversation

@kkaefer

@kkaefer kkaefer commented May 17, 2016

Copy link
Copy Markdown
Member

Fixes #998 and excess trailing zeros introduced by #4916.

Supersedes #4965.

cc @friedbunny @1ec5

@kkaefer
kkaefer force-pushed the js-number-format-998 branch 2 times, most recently from 8e3fa73 to 60a96e9 Compare May 17, 2016 16:38
@1ec5 1ec5 added bug Core The cross-platform C++ core, aka mbgl labels May 17, 2016
Comment thread src/mbgl/util/dtoa.cpp
@@ -0,0 +1,97 @@
#include "dtoa.hpp"

#include <rapidjson/internal/dtoa.h>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it OK to be including an internal header like this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's internal, but RapidJSON is header only, so we're not going to run into ABI-incompatibilities, and we'll notice as soon as they change the internal function signatures (which is unlikely).

@kkaefer
kkaefer force-pushed the js-number-format-998 branch from 60a96e9 to c5fc7f1 Compare May 18, 2016 10:26
@kkaefer
kkaefer merged commit c5fc7f1 into master May 18, 2016
@kkaefer
kkaefer deleted the js-number-format-998 branch May 18, 2016 10:39
@friedbunny

Copy link
Copy Markdown
Contributor

Thanks, @kkaefer. 🎯

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Core The cross-platform C++ core, aka mbgl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants