|
|
@@ -1191,7 +1191,7 @@ typedef struct SDL_alignment_test
|
|
|
void *b;
|
|
|
} SDL_alignment_test;
|
|
|
SDL_COMPILE_TIME_ASSERT(struct_alignment, sizeof(SDL_alignment_test) == (2 * sizeof(void *)));
|
|
|
-SDL_COMPILE_TIME_ASSERT(two_s_complement, (int)~(int)0 == (int)(-1));
|
|
|
+SDL_COMPILE_TIME_ASSERT(two_s_complement, SDL_static_cast(int, ~SDL_static_cast(int, 0)) == SDL_static_cast(int, -1));
|
|
|
#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
|
|
|
/** \endcond */
|
|
|
|
|
|
@@ -5948,7 +5948,7 @@ extern SDL_DECLSPEC char * SDLCALL SDL_iconv_string(const char *tocode,
|
|
|
*
|
|
|
* \since This macro is available since SDL 3.2.0.
|
|
|
*/
|
|
|
-#define SDL_iconv_utf8_ucs2(S) (Uint16 *)SDL_iconv_string("UCS-2", "UTF-8", S, SDL_strlen(S)+1)
|
|
|
+#define SDL_iconv_utf8_ucs2(S) SDL_reinterpret_cast(Uint16 *, SDL_iconv_string("UCS-2", "UTF-8", S, SDL_strlen(S)+1))
|
|
|
|
|
|
/**
|
|
|
* Convert a UTF-8 string to UCS-4.
|
|
|
@@ -5962,7 +5962,7 @@ extern SDL_DECLSPEC char * SDLCALL SDL_iconv_string(const char *tocode,
|
|
|
*
|
|
|
* \since This macro is available since SDL 3.2.0.
|
|
|
*/
|
|
|
-#define SDL_iconv_utf8_ucs4(S) (Uint32 *)SDL_iconv_string("UCS-4", "UTF-8", S, SDL_strlen(S)+1)
|
|
|
+#define SDL_iconv_utf8_ucs4(S) SDL_reinterpret_cast(Uint32 *, SDL_iconv_string("UCS-4", "UTF-8", S, SDL_strlen(S)+1))
|
|
|
|
|
|
/**
|
|
|
* Convert a wchar_t string to UTF-8.
|
|
|
@@ -5976,7 +5976,7 @@ extern SDL_DECLSPEC char * SDLCALL SDL_iconv_string(const char *tocode,
|
|
|
*
|
|
|
* \since This macro is available since SDL 3.2.0.
|
|
|
*/
|
|
|
-#define SDL_iconv_wchar_utf8(S) SDL_iconv_string("UTF-8", "WCHAR_T", (char *)S, (SDL_wcslen(S)+1)*sizeof(wchar_t))
|
|
|
+#define SDL_iconv_wchar_utf8(S) SDL_iconv_string("UTF-8", "WCHAR_T", SDL_reinterpret_cast(const char *, S), (SDL_wcslen(S)+1)*sizeof(wchar_t))
|
|
|
|
|
|
|
|
|
/* force builds using Clang's static analysis tools to use literal C runtime
|