[buffer] Fix order of HB_INTERNAL HB_DISCARD

Sucks that has to be specified in this order. But that is what it is for now.

Was only exhibiting problem on C++>=17 since that's when the [[nodiscard]]
was introduced.
This commit is contained in:
Behdad Esfahbod 2021-03-15 16:50:54 -06:00
parent 9582640eed
commit 9e397ff2fb
1 changed files with 4 additions and 4 deletions

View File

@ -332,9 +332,9 @@ struct hb_buffer_t
/* Internal methods */
HB_INTERNAL HB_NODISCARD bool move_to (unsigned int i); /* i is output-buffer index. */
HB_NODISCARD HB_INTERNAL bool move_to (unsigned int i); /* i is output-buffer index. */
HB_INTERNAL HB_NODISCARD bool enlarge (unsigned int size);
HB_NODISCARD HB_INTERNAL bool enlarge (unsigned int size);
HB_NODISCARD bool ensure (unsigned int size)
{ return likely (!size || size < allocated) ? true : enlarge (size); }
@ -375,8 +375,8 @@ struct hb_buffer_t
return true;
}
HB_INTERNAL HB_NODISCARD bool make_room_for (unsigned int num_in, unsigned int num_out);
HB_INTERNAL HB_NODISCARD bool shift_forward (unsigned int count);
HB_NODISCARD HB_INTERNAL bool make_room_for (unsigned int num_in, unsigned int num_out);
HB_NODISCARD HB_INTERNAL bool shift_forward (unsigned int count);
typedef long scratch_buffer_t;
HB_INTERNAL scratch_buffer_t *get_scratch_buffer (unsigned int *size);