Remove #ifdefs
for handling compilation with Visual Studio < 2015
Godot 3.3 and later require Visual Studio 2017 to be compiled.
(cherry picked from commit fc0bfbb33b
)
This commit is contained in:
parent
e1be41b2c6
commit
59eafe4cd3
2 changed files with 4 additions and 4 deletions
|
@ -1394,13 +1394,13 @@ String String::num_scientific(double p_num) {
|
||||||
|
|
||||||
#if defined(__GNUC__) || defined(_MSC_VER)
|
#if defined(__GNUC__) || defined(_MSC_VER)
|
||||||
|
|
||||||
#if (defined(__MINGW32__) || (defined(_MSC_VER) && _MSC_VER < 1900)) && defined(_TWO_DIGIT_EXPONENT) && !defined(_UCRT)
|
#if defined(__MINGW32__) && defined(_TWO_DIGIT_EXPONENT) && !defined(_UCRT)
|
||||||
// MinGW and old MSC require _set_output_format() to conform to C99 output for printf
|
// MinGW requires _set_output_format() to conform to C99 output for printf
|
||||||
unsigned int old_exponent_format = _set_output_format(_TWO_DIGIT_EXPONENT);
|
unsigned int old_exponent_format = _set_output_format(_TWO_DIGIT_EXPONENT);
|
||||||
#endif
|
#endif
|
||||||
snprintf(buf, 256, "%lg", p_num);
|
snprintf(buf, 256, "%lg", p_num);
|
||||||
|
|
||||||
#if (defined(__MINGW32__) || (defined(_MSC_VER) && _MSC_VER < 1900)) && defined(_TWO_DIGIT_EXPONENT) && !defined(_UCRT)
|
#if defined(__MINGW32__) && defined(_TWO_DIGIT_EXPONENT) && !defined(_UCRT)
|
||||||
_set_output_format(old_exponent_format);
|
_set_output_format(old_exponent_format);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -206,7 +206,7 @@ String str_format(const char *p_format, ...) {
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MINGW_ENABLED) || defined(_MSC_VER) && _MSC_VER < 1900
|
#if defined(MINGW_ENABLED)
|
||||||
#define gd_vsnprintf(m_buffer, m_count, m_format, m_args_copy) vsnprintf_s(m_buffer, m_count, _TRUNCATE, m_format, m_args_copy)
|
#define gd_vsnprintf(m_buffer, m_count, m_format, m_args_copy) vsnprintf_s(m_buffer, m_count, _TRUNCATE, m_format, m_args_copy)
|
||||||
#define gd_vscprintf(m_format, m_args_copy) _vscprintf(m_format, m_args_copy)
|
#define gd_vscprintf(m_format, m_args_copy) _vscprintf(m_format, m_args_copy)
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in a new issue