More -Wcomma fixes
Fixes https://github.com/harfbuzz/harfbuzz/issues/3716
This commit is contained in:
parent
c2712ff4f5
commit
4ee471922d
|
@ -972,7 +972,7 @@ void hb_qsort(void *base, size_t nel, size_t width,
|
||||||
[void *arg]);
|
[void *arg]);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define SORT_R_SWAP(a,b,tmp) ((tmp) = (a), (a) = (b), (b) = (tmp))
|
#define SORT_R_SWAP(a,b,tmp) ((void) ((tmp) = (a)), (void) ((a) = (b)), (b) = (tmp))
|
||||||
|
|
||||||
/* swap a and b */
|
/* swap a and b */
|
||||||
/* a and b must not be equal! */
|
/* a and b must not be equal! */
|
||||||
|
|
|
@ -71,12 +71,12 @@ _hb_ot_metrics_get_position_common (hb_font_t *font,
|
||||||
#endif
|
#endif
|
||||||
#define GET_METRIC_X(TABLE, ATTR) \
|
#define GET_METRIC_X(TABLE, ATTR) \
|
||||||
(face->table.TABLE->has_data () && \
|
(face->table.TABLE->has_data () && \
|
||||||
(position && (*position = font->em_scalef_x (_fix_ascender_descender ( \
|
((void) (position && (*position = font->em_scalef_x (_fix_ascender_descender ( \
|
||||||
face->table.TABLE->ATTR + GET_VAR, metrics_tag))), true))
|
face->table.TABLE->ATTR + GET_VAR, metrics_tag)))), true))
|
||||||
#define GET_METRIC_Y(TABLE, ATTR) \
|
#define GET_METRIC_Y(TABLE, ATTR) \
|
||||||
(face->table.TABLE->has_data () && \
|
(face->table.TABLE->has_data () && \
|
||||||
(position && (*position = font->em_scalef_y (_fix_ascender_descender ( \
|
((void) (position && (*position = font->em_scalef_y (_fix_ascender_descender ( \
|
||||||
face->table.TABLE->ATTR + GET_VAR, metrics_tag))), true))
|
face->table.TABLE->ATTR + GET_VAR, metrics_tag)))), true))
|
||||||
|
|
||||||
case HB_OT_METRICS_TAG_HORIZONTAL_ASCENDER:
|
case HB_OT_METRICS_TAG_HORIZONTAL_ASCENDER:
|
||||||
return (face->table.OS2->use_typo_metrics () && GET_METRIC_Y (OS2, sTypoAscender)) ||
|
return (face->table.OS2->use_typo_metrics () && GET_METRIC_Y (OS2, sTypoAscender)) ||
|
||||||
|
@ -154,10 +154,10 @@ hb_ot_metrics_get_position (hb_font_t *font,
|
||||||
#endif
|
#endif
|
||||||
#define GET_METRIC_X(TABLE, ATTR) \
|
#define GET_METRIC_X(TABLE, ATTR) \
|
||||||
(face->table.TABLE->has_data () && \
|
(face->table.TABLE->has_data () && \
|
||||||
(position && (*position = font->em_scalef_x (face->table.TABLE->ATTR + GET_VAR)), true))
|
((void) (position && (*position = font->em_scalef_x (face->table.TABLE->ATTR + GET_VAR))), true))
|
||||||
#define GET_METRIC_Y(TABLE, ATTR) \
|
#define GET_METRIC_Y(TABLE, ATTR) \
|
||||||
(face->table.TABLE->has_data () && \
|
(face->table.TABLE->has_data () && \
|
||||||
(position && (*position = font->em_scalef_y (face->table.TABLE->ATTR + GET_VAR)), true))
|
((void) (position && (*position = font->em_scalef_y (face->table.TABLE->ATTR + GET_VAR))), true))
|
||||||
case HB_OT_METRICS_TAG_HORIZONTAL_CLIPPING_ASCENT: return GET_METRIC_Y (OS2, usWinAscent);
|
case HB_OT_METRICS_TAG_HORIZONTAL_CLIPPING_ASCENT: return GET_METRIC_Y (OS2, usWinAscent);
|
||||||
case HB_OT_METRICS_TAG_HORIZONTAL_CLIPPING_DESCENT: return GET_METRIC_Y (OS2, usWinDescent);
|
case HB_OT_METRICS_TAG_HORIZONTAL_CLIPPING_DESCENT: return GET_METRIC_Y (OS2, usWinDescent);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue