| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright © 2012 Google, Inc. | 2 * Copyright © 2012 Google, Inc. |
| 3 * | 3 * |
| 4 * This is part of HarfBuzz, a text shaping library. | 4 * This is part of HarfBuzz, a text shaping library. |
| 5 * | 5 * |
| 6 * Permission is hereby granted, without written agreement and without | 6 * Permission is hereby granted, without written agreement and without |
| 7 * license or royalty fees, to use, copy, modify, and distribute this | 7 * license or royalty fees, to use, copy, modify, and distribute this |
| 8 * software and its documentation for any purpose, provided that the | 8 * software and its documentation for any purpose, provided that the |
| 9 * above copyright notice and the following two paragraphs appear in | 9 * above copyright notice and the following two paragraphs appear in |
| 10 * all copies of this software. | 10 * all copies of this software. |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 | 143 |
| 144 /* TODO Make this faster and memmory efficient. */ | 144 /* TODO Make this faster and memmory efficient. */ |
| 145 | 145 |
| 146 struct hb_set_t | 146 struct hb_set_t |
| 147 { | 147 { |
| 148 hb_object_header_t header; | 148 hb_object_header_t header; |
| 149 ASSERT_POD (); | 149 ASSERT_POD (); |
| 150 bool in_error; | 150 bool in_error; |
| 151 | 151 |
| 152 inline void init (void) { | 152 inline void init (void) { |
| 153 header.init (); | 153 hb_object_init (this); |
| 154 clear (); | 154 clear (); |
| 155 } | 155 } |
| 156 inline void fini (void) { | 156 inline void fini (void) { |
| 157 } | 157 } |
| 158 inline void clear (void) { | 158 inline void clear (void) { |
| 159 if (unlikely (hb_object_is_inert (this))) | 159 if (unlikely (hb_object_is_inert (this))) |
| 160 return; | 160 return; |
| 161 in_error = false; | 161 in_error = false; |
| 162 memset (elts, 0, sizeof elts); | 162 memset (elts, 0, sizeof elts); |
| 163 } | 163 } |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 | 331 |
| 332 elt_t elts[ELTS]; /* XXX 8kb */ | 332 elt_t elts[ELTS]; /* XXX 8kb */ |
| 333 | 333 |
| 334 ASSERT_STATIC (sizeof (elt_t) * 8 == BITS); | 334 ASSERT_STATIC (sizeof (elt_t) * 8 == BITS); |
| 335 ASSERT_STATIC (sizeof (elt_t) * 8 * ELTS > MAX_G); | 335 ASSERT_STATIC (sizeof (elt_t) * 8 * ELTS > MAX_G); |
| 336 }; | 336 }; |
| 337 | 337 |
| 338 | 338 |
| 339 | 339 |
| 340 #endif /* HB_SET_PRIVATE_HH */ | 340 #endif /* HB_SET_PRIVATE_HH */ |
| OLD | NEW |