[minor:aat] Simplify template reference
This commit is contained in:
parent
7b8a8adb7d
commit
e27420bb18
|
@ -729,7 +729,9 @@ struct ExtendedTypes
|
||||||
template <typename Types, typename EntryData>
|
template <typename Types, typename EntryData>
|
||||||
struct StateTableDriver
|
struct StateTableDriver
|
||||||
{
|
{
|
||||||
StateTableDriver (const StateTable<Types, EntryData> &machine_,
|
using StateTable = StateTable<Types, EntryData>;
|
||||||
|
|
||||||
|
StateTableDriver (const StateTable &machine_,
|
||||||
hb_buffer_t *buffer_,
|
hb_buffer_t *buffer_,
|
||||||
hb_face_t *face_) :
|
hb_face_t *face_) :
|
||||||
machine (machine_),
|
machine (machine_),
|
||||||
|
@ -742,12 +744,12 @@ struct StateTableDriver
|
||||||
if (!c->in_place)
|
if (!c->in_place)
|
||||||
buffer->clear_output ();
|
buffer->clear_output ();
|
||||||
|
|
||||||
int state = StateTable<Types, EntryData>::STATE_START_OF_TEXT;
|
int state = StateTable::STATE_START_OF_TEXT;
|
||||||
for (buffer->idx = 0; buffer->successful;)
|
for (buffer->idx = 0; buffer->successful;)
|
||||||
{
|
{
|
||||||
unsigned int klass = buffer->idx < buffer->len ?
|
unsigned int klass = buffer->idx < buffer->len ?
|
||||||
machine.get_class (buffer->info[buffer->idx].codepoint, num_glyphs) :
|
machine.get_class (buffer->info[buffer->idx].codepoint, num_glyphs) :
|
||||||
(unsigned) StateTable<Types, EntryData>::CLASS_END_OF_TEXT;
|
(unsigned) StateTable::CLASS_END_OF_TEXT;
|
||||||
DEBUG_MSG (APPLY, nullptr, "c%u at %u", klass, buffer->idx);
|
DEBUG_MSG (APPLY, nullptr, "c%u at %u", klass, buffer->idx);
|
||||||
const Entry<EntryData> &entry = machine.get_entry (state, klass);
|
const Entry<EntryData> &entry = machine.get_entry (state, klass);
|
||||||
|
|
||||||
|
@ -760,7 +762,7 @@ struct StateTableDriver
|
||||||
/* If there's no action and we're just epsilon-transitioning to state 0,
|
/* If there's no action and we're just epsilon-transitioning to state 0,
|
||||||
* safe to break. */
|
* safe to break. */
|
||||||
if (c->is_actionable (this, entry) ||
|
if (c->is_actionable (this, entry) ||
|
||||||
!(entry.newState == StateTable<Types, EntryData>::STATE_START_OF_TEXT &&
|
!(entry.newState == StateTable::STATE_START_OF_TEXT &&
|
||||||
entry.flags == context_t::DontAdvance))
|
entry.flags == context_t::DontAdvance))
|
||||||
buffer->unsafe_to_break_from_outbuffer (buffer->backtrack_len () - 1, buffer->idx + 1);
|
buffer->unsafe_to_break_from_outbuffer (buffer->backtrack_len () - 1, buffer->idx + 1);
|
||||||
}
|
}
|
||||||
|
@ -768,7 +770,7 @@ struct StateTableDriver
|
||||||
/* Unsafe-to-break if end-of-text would kick in here. */
|
/* Unsafe-to-break if end-of-text would kick in here. */
|
||||||
if (buffer->backtrack_len () && buffer->idx < buffer->len)
|
if (buffer->backtrack_len () && buffer->idx < buffer->len)
|
||||||
{
|
{
|
||||||
const Entry<EntryData> &end_entry = machine.get_entry (state, StateTable<Types, EntryData>::CLASS_END_OF_TEXT);
|
const Entry<EntryData> &end_entry = machine.get_entry (state, StateTable::CLASS_END_OF_TEXT);
|
||||||
if (c->is_actionable (this, end_entry))
|
if (c->is_actionable (this, end_entry))
|
||||||
buffer->unsafe_to_break_from_outbuffer (buffer->backtrack_len () - 1, buffer->idx + 1);
|
buffer->unsafe_to_break_from_outbuffer (buffer->backtrack_len () - 1, buffer->idx + 1);
|
||||||
}
|
}
|
||||||
|
@ -794,7 +796,7 @@ struct StateTableDriver
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
const StateTable<Types, EntryData> &machine;
|
const StateTable &machine;
|
||||||
hb_buffer_t *buffer;
|
hb_buffer_t *buffer;
|
||||||
unsigned int num_glyphs;
|
unsigned int num_glyphs;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue