diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2012-05-13 15:45:18 +0200 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2012-05-13 15:45:18 +0200 |
commit | 99c2695759a6af855d565f4994bbdf220570bb48 (patch) | |
tree | 1795ac99d62c54ed258785d8af61825312ccd025 /src/hb-buffer-private.hh | |
parent | 6736f3c5b09af6a71935afc04248b033e171a9b2 (diff) |
Add accessort to buffer for current info, current pos, and prev info
Diffstat (limited to 'src/hb-buffer-private.hh')
-rw-r--r-- | src/hb-buffer-private.hh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/hb-buffer-private.hh b/src/hb-buffer-private.hh index 62966083..e9e0f822 100644 --- a/src/hb-buffer-private.hh +++ b/src/hb-buffer-private.hh @@ -70,6 +70,15 @@ struct _hb_buffer_t { hb_glyph_info_t *out_info; hb_glyph_position_t *pos; + inline hb_glyph_info_t &cur (unsigned int i = 0) { return info[idx + i]; } + inline hb_glyph_info_t cur (unsigned int i = 0) const { return info[idx + i]; } + + inline hb_glyph_position_t &cur_pos (unsigned int i = 0) { return pos[idx + i]; } + inline hb_glyph_position_t cur_pos (unsigned int i = 0) const { return pos[idx + i]; } + + inline hb_glyph_info_t &prev (void) { return out_info[out_len - 1]; } + inline hb_glyph_info_t prev (void) const { return info[out_len - 1]; } + unsigned int serial; uint8_t allocated_var_bytes[8]; const char *allocated_var_owner[8]; |