From 9e397ff2fb1beb08a226f12d68a406a13023f03d Mon Sep 17 00:00:00 2001
From: Behdad Esfahbod <behdad@behdad.org>
Date: Mon, 15 Mar 2021 16:50:54 -0600
Subject: [PATCH] [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.
---
 src/hb-buffer.hh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/hb-buffer.hh b/src/hb-buffer.hh
index 7a754175e..8b432b5f9 100644
--- a/src/hb-buffer.hh
+++ b/src/hb-buffer.hh
@@ -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);