diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-07-18 12:57:14 +0200 |
---|---|---|
committer | Kai Köhne <kai.koehne@qt.io> | 2022-07-22 14:25:26 +0200 |
commit | e79d7f12e6ca15c499a553e4a701a2887e4b184c (patch) | |
tree | 93138f4b91f0e56621836f6a46291cd219bfd641 /src/3rdparty/freetype/include/freetype/config/public-macros.h | |
parent | 425a6415e7593c99c779b406ea5b30fd5975767c (diff) |
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 <kai.koehne@qt.io>
Diffstat (limited to 'src/3rdparty/freetype/include/freetype/config/public-macros.h')
-rw-r--r-- | src/3rdparty/freetype/include/freetype/config/public-macros.h | 20 |
1 files changed, 19 insertions, 1 deletions
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<type>(var) +#define FT_REINTERPRET_CAST( type, var ) reinterpret_cast<type>(var) + +#define FT_STATIC_BYTE_CAST( type, var ) \ + static_cast<type>( static_cast<unsigned char>( 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_ */ |