diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc index bbbbd227c..5dd83fc2c 100644 --- a/src/hb-buffer.cc +++ b/src/hb-buffer.cc @@ -2026,9 +2026,6 @@ hb_buffer_set_message_func (hb_buffer_t *buffer, bool hb_buffer_t::message_impl (hb_font_t *font, const char *fmt, va_list ap) { -#ifdef HB_NO_BUFFER_MESSAGE - return false; -#endif char buf[100]; vsnprintf (buf, sizeof (buf), fmt, ap); return (bool) this->message_func (this, font, buf, this->message_data); diff --git a/src/hb-buffer.hh b/src/hb-buffer.hh index b2b190ace..9aae38dbb 100644 --- a/src/hb-buffer.hh +++ b/src/hb-buffer.hh @@ -347,7 +347,13 @@ struct hb_buffer_t HB_INTERNAL void sort (unsigned int start, unsigned int end, int(*compar)(const hb_glyph_info_t *, const hb_glyph_info_t *)); - bool messaging () { return unlikely (message_func); } + bool messaging () + { +#ifdef HB_NO_BUFFER_MESSAGE + return false; +#endif + return unlikely (message_func); + } bool message (hb_font_t *font, const char *fmt, ...) HB_PRINTF_FUNC(3, 4) { if (!messaging ())