Commit 1d8c1285 authored by VAN TOLL Wouter's avatar VAN TOLL Wouter
Browse files

Moved std::setlocale from APIFunctions to CrowdSimulator. This fixes...

Moved std::setlocale from APIFunctions to CrowdSimulator. This fixes comma/point issues for the GUI and console application.
parent 22706502
......@@ -34,6 +34,7 @@
#include <core/worldToric.h>
#include <core/costFunctionFactory.h>
#include <memory>
#include <clocale>
CrowdSimulator::CrowdSimulator()
{
......@@ -524,6 +525,8 @@ bool CrowdSimulator::FromConfigFile_loadSingleObstacle(const tinyxml2::XMLElemen
CrowdSimulator* CrowdSimulator::FromConfigFile(const std::string& filename)
{
std::setlocale(LC_NUMERIC, "en_US.UTF-8");
// Parse the XML into the property tree.
// If the path cannot be resolved, an exception is thrown.
tinyxml2::XMLDocument doc;
......
......@@ -35,7 +35,6 @@
#include <omp.h>
#include <cstring>
#include <string>
#include <clocale>
extern "C"
{
......@@ -53,9 +52,7 @@ extern "C"
API_FUNCTION bool StartSimulation(const char* configFileName, int numberOfThreads)
{
std::setlocale(LC_NUMERIC, "en_US.UTF-8");
omp_set_num_threads(numberOfThreads);
omp_set_num_threads(numberOfThreads);
// initialize a new crowd simulation; we'll fill it with the contents of the given config file
cs = CrowdSimulator::FromConfigFile(configFileName);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment