# HG changeset patch # User Sebastien Jodogne # Date 1572083078 -7200 # Node ID f7759637cdfb68face2d837d424c511711eaaa8d # Parent a9d10e54c5360f98b8e1a5b750017fecda25b835# Parent 141593f1aa887a474981254f5442c7776b303fb2 integration mainline->broker diff -r a9d10e54c536 -r f7759637cdfb Applications/Samples/SingleFrameEditorApplication.h diff -r a9d10e54c536 -r f7759637cdfb Framework/Toolbox/GenericToolbox.h diff -r a9d10e54c536 -r f7759637cdfb UnitTestsSources/GenericToolboxTests.cpp --- a/UnitTestsSources/GenericToolboxTests.cpp Sat Oct 26 11:37:40 2019 +0200 +++ b/UnitTestsSources/GenericToolboxTests.cpp Sat Oct 26 11:44:38 2019 +0200 @@ -3762,7 +3762,11 @@ for (double b = DBL_EPSILON; b < DBL_MAX && i < COUNT; ++i, b *= FACTOR) { char txt[1024]; +#if defined(_MSC_VER) + sprintf_s(txt, "%.17f", b); +#else snprintf(txt, sizeof(txt) - 1, "%.17f", b); +#endif double r = 0.0; bool ok = StringToDouble(r, txt); @@ -3802,7 +3806,11 @@ for (double b = -1.0*DBL_EPSILON; b < DBL_MAX && i < COUNT; ++i, b *= FACTOR) { char txt[1024]; +#if defined(_MSC_VER) + sprintf_s(txt, "%.17f", b); +#else snprintf(txt, sizeof(txt) - 1, "%.17f", b); +#endif double r = 0.0; bool ok = StringToDouble(r, txt); @@ -3842,12 +3850,14 @@ { int64_t bi = static_cast(b); char txt[1024]; -#if (defined __clang__) || (defined __GNUC__) || ( (defined _MSC_VER) && (_MSC_VER > 1800) ) +#if defined(_MSC_VER) +# if (_MSC_VER > 1800) + sprintf_s(txt, "%lld", bi); +# else + sprintf_s(txt, "%I64d", bi); +# endif +#else snprintf(txt, sizeof(txt) - 1, "%ld", bi); -#elif (defined _MSC_VER) - snprintf(txt, sizeof(txt) - 1, "%I64d", bi); -#else -#error Please adjust for your platform #endif int64_t r = 0; bool ok = StringToInteger(r, txt);