[pango/pango2] pango-font-private.h: Fix builds on Visual Studio+DWrite
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/pango2] pango-font-private.h: Fix builds on Visual Studio+DWrite
- Date: Wed, 15 Jun 2022 04:47:37 +0000 (UTC)
commit b6ee7ccf5e791293c72a42fc5c3de029cfc35364
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Mon Jun 13 11:51:23 2022 +0800
pango-font-private.h: Fix builds on Visual Studio+DWrite
The DirectWrite support code sadly needs to be done in C++, meaning that
more type checking is done by the Visual Studio compiler and one cannot do
some items in the C99 fashion (i.e. GCCism) as opposed to using plain C.
This fixes the build of pangodwrite-fontmap.cpp for the DWrite support.
pango/pango-font-private.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/pango/pango-font-private.h b/pango/pango-font-private.h
index 4f498eef..5644f591 100644
--- a/pango/pango-font-private.h
+++ b/pango/pango-font-private.h
@@ -79,7 +79,7 @@ static inline void
pango_font_set_face (PangoFont *font,
PangoFontFace *face)
{
- font->face = g_object_ref (face);
+ font->face = (PangoFontFace *) g_object_ref (face);
}
static inline void
@@ -107,7 +107,8 @@ static inline void
pango_font_set_ctm (PangoFont *font,
const PangoMatrix *ctm)
{
- font->ctm = ctm ? *ctm : (PangoMatrix) PANGO_MATRIX_INIT;
+ const PangoMatrix matrix_init = PANGO_MATRIX_INIT;
+ font->ctm = ctm ? *ctm : matrix_init;
}
gboolean pango_font_is_hinted (PangoFont *font);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]