forked from organicmaps/organicmaps
Workaround for crash when parsing doubles, if decimal delimiter is comma instead of dot.
TODO: Use locale-independent double parser.
This commit is contained in:
parent
6f7399ceee
commit
9557b7e850
1 changed files with 7 additions and 0 deletions
|
@ -12,6 +12,7 @@
|
|||
#include "base/object_tracker.hpp"
|
||||
|
||||
#include "std/cstdio.hpp"
|
||||
#include "std/cstdlib.hpp"
|
||||
|
||||
#include "3party/Alohalytics/src/alohalytics.h"
|
||||
|
||||
|
@ -62,6 +63,12 @@ namespace
|
|||
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
// Our double parsing code (base/string_utils.hpp) needs dots as a floating point delimiters, not commas.
|
||||
// TODO: Refactor our doubles parsing code to use locale-independent delimiters.
|
||||
// For example, https://github.com/google/double-conversion can be used.
|
||||
// See http://dbaron.org/log/20121222-locale for more details.
|
||||
(void)::setenv("LC_NUMERIC", "C", 1);
|
||||
|
||||
InitializeFinalize mainGuard;
|
||||
UNUSED_VALUE(mainGuard);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue