From e79d7f12e6ca15c499a553e4a701a2887e4b184c Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Mon, 18 Jul 2022 12:57:14 +0200 Subject: Update freetype to 2.12.1 ftdebug.c files are new, adapted the import script to copy the source file for Windows as well. Replaced the CMakeLists.txt content that was imported from the .pro file with the respective variables and logic from the freetype CMakeLists.txt file, which should make it easier to maintain this next time. Pick-to: 6.4 6.3 6.2 5.15 5.12 Fixes: QTBUG-105032 Change-Id: I1e846167b268df4b1b0a50dcec602def1a0bdcb4 Reviewed-by: Kai Koehne --- .../freetype/include/freetype/config/public-macros.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'src/3rdparty/freetype/include/freetype/config/public-macros.h') diff --git a/src/3rdparty/freetype/include/freetype/config/public-macros.h b/src/3rdparty/freetype/include/freetype/config/public-macros.h index 6aa673e807..0074134f1d 100644 --- a/src/3rdparty/freetype/include/freetype/config/public-macros.h +++ b/src/3rdparty/freetype/include/freetype/config/public-macros.h @@ -4,7 +4,7 @@ * * Define a set of compiler macros used in public FreeType headers. * - * Copyright (C) 2020 by + * Copyright (C) 2020-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -103,6 +103,7 @@ FT_BEGIN_HEADER */ #define FT_EXPORT( x ) FT_PUBLIC_FUNCTION_ATTRIBUTE extern x + /* * `FT_UNUSED` indicates that a given parameter is not used -- this is * only used to get rid of unpleasant compiler warnings. @@ -115,6 +116,23 @@ FT_BEGIN_HEADER #endif + /* + * Support for casts in both C and C++. + */ +#ifdef __cplusplus +#define FT_STATIC_CAST( type, var ) static_cast(var) +#define FT_REINTERPRET_CAST( type, var ) reinterpret_cast(var) + +#define FT_STATIC_BYTE_CAST( type, var ) \ + static_cast( static_cast( var ) ) +#else +#define FT_STATIC_CAST( type, var ) (type)(var) +#define FT_REINTERPRET_CAST( type, var ) (type)(var) + +#define FT_STATIC_BYTE_CAST( type, var ) (type)(unsigned char)(var) +#endif + + FT_END_HEADER #endif /* FREETYPE_CONFIG_PUBLIC_MACROS_H_ */ -- cgit v1.2.3