diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-05-03 09:53:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-03 09:53:49 +0200 |
commit | 29c702379864938f79ab36f448199007e48dbf38 (patch) | |
tree | 1cb4653c18638195bed2b9d32edfc87407ef068f | |
parent | a928a10e835190539c3f704bb18ac56a75efddea (diff) | |
parent | 596d42615155c945234e27b65a91c7654891453b (diff) |
Merge pull request #38421 from Calinou/remove-cpp11-polyfills
Remove some C++11 polyfill defines that are no longer needed
-rw-r--r-- | core/io/logger.cpp | 11 | ||||
-rw-r--r-- | core/variant.h | 9 | ||||
-rw-r--r-- | modules/mono/utils/string_utils.cpp | 10 |
3 files changed, 1 insertions, 29 deletions
diff --git a/core/io/logger.cpp b/core/io/logger.cpp index 48aebeda3d..ad0cc81023 100644 --- a/core/io/logger.cpp +++ b/core/io/logger.cpp @@ -34,17 +34,6 @@ #include "core/os/os.h" #include "core/print_string.h" -// va_copy was defined in the C99, but not in C++ standards before C++11. -// When you compile C++ without --std=c++<XX> option, compilers still define -// va_copy, otherwise you have to use the internal version (__va_copy). -#if !defined(va_copy) -#if defined(__GNUC__) -#define va_copy(d, s) __va_copy((d), (s)) -#else -#define va_copy(d, s) ((d) = (s)) -#endif -#endif - #if defined(MINGW_ENABLED) || defined(_MSC_VER) #define sprintf sprintf_s #endif diff --git a/core/variant.h b/core/variant.h index a832f7ccf8..1ae09ad82f 100644 --- a/core/variant.h +++ b/core/variant.h @@ -67,13 +67,6 @@ typedef Vector<Vector2> PackedVector2Array; typedef Vector<Vector3> PackedVector3Array; typedef Vector<Color> PackedColorArray; -// Temporary workaround until c++11 alignas() -#ifdef __GNUC__ -#define GCC_ALIGNED_8 __attribute__((aligned(8))) -#else -#define GCC_ALIGNED_8 -#endif - class Variant { public: // If this changes the table in variant_op must be updated @@ -211,7 +204,7 @@ private: PackedArrayRefBase *packed_array; void *_ptr; //generic pointer uint8_t _mem[sizeof(ObjData) > (sizeof(real_t) * 4) ? sizeof(ObjData) : (sizeof(real_t) * 4)]; - } _data GCC_ALIGNED_8; + } _data alignas(8); void reference(const Variant &p_variant); void clear(); diff --git a/modules/mono/utils/string_utils.cpp b/modules/mono/utils/string_utils.cpp index 907811355f..67b264d803 100644 --- a/modules/mono/utils/string_utils.cpp +++ b/modules/mono/utils/string_utils.cpp @@ -196,16 +196,6 @@ String str_format(const char *p_format, ...) { return res; } -// va_copy was defined in the C99, but not in C++ standards before C++11. -// When you compile C++ without --std=c++<XX> option, compilers still define -// va_copy, otherwise you have to use the internal version (__va_copy). -#if !defined(va_copy) -#if defined(__GNUC__) -#define va_copy(d, s) __va_copy((d), (s)) -#else -#define va_copy(d, s) ((d) = (s)) -#endif -#endif #if defined(MINGW_ENABLED) || defined(_MSC_VER) && _MSC_VER < 1900 #define gd_vsnprintf(m_buffer, m_count, m_format, m_args_copy) vsnprintf_s(m_buffer, m_count, _TRUNCATE, m_format, m_args_copy) |