Module: wine Branch: master Commit: d871f04bbdcf991b2b4b4433fb156a5636c72587 URL: https://source.winehq.org/git/wine.git/?a=commit;h=d871f04bbdcf991b2b4b4433f...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Mon Mar 15 10:36:47 2021 +0300
dwrite: Test simulations mask bitwise for consistency.
This has no functional impact. Internal function is only called with one bit set at a time, but there is no reason to make it more confusing.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/dwrite/font.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 14be1b9fc1b..4e2917854ba 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -4022,7 +4022,7 @@ static HRESULT init_font_data(const struct fontface_desc *desc, struct dwrite_fo return S_OK; }
-static HRESULT init_font_data_from_font(const struct dwrite_font_data *src, DWRITE_FONT_SIMULATIONS sim, +static HRESULT init_font_data_from_font(const struct dwrite_font_data *src, DWRITE_FONT_SIMULATIONS simulations, const WCHAR *facenameW, struct dwrite_font_data **ret) { struct dwrite_font_data *data; @@ -4035,10 +4035,10 @@ static HRESULT init_font_data_from_font(const struct dwrite_font_data *src, DWRI
*data = *src; data->refcount = 1; - data->simulations |= sim; - if (sim == DWRITE_FONT_SIMULATIONS_BOLD) + data->simulations |= simulations; + if (simulations & DWRITE_FONT_SIMULATIONS_BOLD) data->weight = DWRITE_FONT_WEIGHT_BOLD; - else if (sim == DWRITE_FONT_SIMULATIONS_OBLIQUE) + if (simulations & DWRITE_FONT_SIMULATIONS_OBLIQUE) data->style = DWRITE_FONT_STYLE_OBLIQUE; memset(data->info_strings, 0, sizeof(data->info_strings)); data->names = NULL;