API change: Remove "mask" from hb_buffer_add()
authorBehdad Esfahbod <behdad@behdad.org>
Wed, 14 Nov 2012 00:26:32 +0000 (16:26 -0800)
committerBehdad Esfahbod <behdad@behdad.org>
Wed, 14 Nov 2012 00:26:32 +0000 (16:26 -0800)
I don't expect anybody using hb_buffer_add(), so this shouldn't break
anyone's code.

src/hb-buffer-private.hh
src/hb-buffer.cc
src/hb-buffer.h

index 6cfb115..6c1f3a3 100644 (file)
@@ -146,7 +146,6 @@ struct hb_buffer_t {
   HB_INTERNAL void deallocate_var_all (void);
 
   HB_INTERNAL void add (hb_codepoint_t  codepoint,
-                       hb_mask_t       mask,
                        unsigned int    cluster);
 
   HB_INTERNAL void reverse_range (unsigned int start, unsigned int end);
index b770144..7a8cb15 100644 (file)
@@ -175,7 +175,6 @@ hb_buffer_t::clear (void)
 
 void
 hb_buffer_t::add (hb_codepoint_t  codepoint,
-                 hb_mask_t       mask,
                  unsigned int    cluster)
 {
   hb_glyph_info_t *glyph;
@@ -186,7 +185,7 @@ hb_buffer_t::add (hb_codepoint_t  codepoint,
 
   memset (glyph, 0, sizeof (*glyph));
   glyph->codepoint = codepoint;
-  glyph->mask = mask;
+  glyph->mask = 1;
   glyph->cluster = cluster;
 
   len++;
@@ -770,10 +769,9 @@ hb_buffer_allocation_successful (hb_buffer_t  *buffer)
 void
 hb_buffer_add (hb_buffer_t    *buffer,
               hb_codepoint_t  codepoint,
-              hb_mask_t       mask,
               unsigned int    cluster)
 {
-  buffer->add (codepoint, mask, cluster);
+  buffer->add (codepoint, cluster);
   buffer->clear_context (1);
 }
 
@@ -902,7 +900,7 @@ hb_buffer_add_utf (hb_buffer_t  *buffer,
     hb_codepoint_t u;
     const T *old_next = next;
     next = hb_utf_next (next, end, &u);
-    buffer->add (u, 1,  old_next - (const T *) text);
+    buffer->add (u, old_next - (const T *) text);
   }
 
   /* Add post-context */
index 533bac8..0b16391 100644 (file)
@@ -177,7 +177,6 @@ hb_buffer_guess_properties (hb_buffer_t *buffer);
 void
 hb_buffer_add (hb_buffer_t    *buffer,
               hb_codepoint_t  codepoint,
-              hb_mask_t       mask,
               unsigned int    cluster);
 
 void