1 diff --git a/src/calibration/calibration.c b/src/calibration/calibration.c
2 index d37c4e6..ec477f5 100644
3 --- a/src/calibration/calibration.c
4 +++ b/src/calibration/calibration.c
7 #include <k4ainternal/common.h>
8 #include <cjson/cJSON.h>
9 -#include <locale.h> //cJSON.h need this set correctly.
11 // System dependencies
13 @@ -637,27 +636,6 @@ k4a_result_t calibration_create_from_raw(char *raw_calibration,
15 k4a_result_t result = K4A_RESULT_SUCCEEDED;
18 - int previous_thread_locale = -1;
19 - if (K4A_SUCCEEDED(result))
21 - previous_thread_locale = _configthreadlocale(_ENABLE_PER_THREAD_LOCALE);
22 - result = K4A_RESULT_FROM_BOOL(previous_thread_locale == _ENABLE_PER_THREAD_LOCALE ||
23 - previous_thread_locale == _DISABLE_PER_THREAD_LOCALE);
26 - if (K4A_SUCCEEDED(result))
28 - result = K4A_RESULT_FROM_BOOL(setlocale(LC_ALL, "C") != NULL);
33 - locale_t thread_locale = newlocale(LC_ALL_MASK, "C", (locale_t)0);
34 - locale_t previous_locale = uselocale(thread_locale);
38 if (K4A_SUCCEEDED(result) && depth_calibration != NULL)
40 result = get_camera_calibration(raw_calibration, depth_calibration, "CALIBRATION_CameraLocationD0");
41 @@ -680,29 +658,6 @@ k4a_result_t calibration_create_from_raw(char *raw_calibration,
42 "CALIBRATION_InertialSensorType_Accelerometer");
46 - if (previous_thread_locale == _ENABLE_PER_THREAD_LOCALE || previous_thread_locale == _DISABLE_PER_THREAD_LOCALE)
48 - if (K4A_FAILED(K4A_RESULT_FROM_BOOL(_configthreadlocale(previous_thread_locale) != -1)))
50 - // Only set result to failed, don't let this call succeed and clear a failure that might have happened
52 - result = K4A_RESULT_FAILED;
56 - if ((previous_locale != NULL) && (K4A_FAILED(K4A_RESULT_FROM_BOOL(uselocale(previous_locale) != NULL))))
58 - // Only set result to failed, don't let this call succeed and clear a failure that might have happened
60 - result = K4A_RESULT_FAILED;
64 - freelocale(thread_locale);