mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-24 00:11:14 +01:00
[matcher] Micro-optimize
Some 2% in Duployan & Roboto.
This commit is contained in:
1 parent
120a38a55e
commit
5163127641
1 file changed
+4
-2
@@ -582,11 +582,12 @@ struct skipping_iterator_t
|
||||
#endif
|
||||
bool next (unsigned *unsafe_to = nullptr)
|
||||
{
|
||||
auto *info = c->buffer->info;
|
||||
const signed stop = (signed) end - 1;
|
||||
while ((signed) idx < stop)
|
||||
{
|
||||
idx++;
|
||||
switch (match (c->buffer->info[idx]))
|
||||
switch (match (info[idx]))
|
||||
{
|
||||
case MATCH:
|
||||
{
|
||||
@@ -612,11 +613,12 @@ struct skipping_iterator_t
|
||||
#endif
|
||||
bool prev (unsigned *unsafe_from = nullptr)
|
||||
{
|
||||
auto *out_info = c->buffer->out_info;
|
||||
const unsigned stop = 0;
|
||||
while (idx > stop)
|
||||
{
|
||||
idx--;
|
||||
switch (match (c->buffer->out_info[idx]))
|
||||
switch (match (out_info[idx]))
|
||||
{
|
||||
case MATCH:
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user