Fix Coverity "missing move operator" (copy to rvalue).
Also makes this bit of code more readable, but the overall handling of Unicode characters in Actions and Transitions is messy, and may get reworked later.
This commit is contained in:
@@ -61,15 +61,16 @@ Transition State::anywhere_rule( wchar_t ch ) const
|
|||||||
|
|
||||||
Transition State::input( wchar_t ch ) const
|
Transition State::input( wchar_t ch ) const
|
||||||
{
|
{
|
||||||
Transition ret = anywhere_rule( ch );
|
/* Check for immediate transitions. */
|
||||||
if ( !ret.next_state ) {
|
Transition anywhere = anywhere_rule( ch );
|
||||||
if ( ch >= 0xA0 ) {
|
if ( anywhere.next_state ) {
|
||||||
ret = this->input_state_rule( 0x41 );
|
anywhere.action->char_present = true;
|
||||||
} else {
|
anywhere.action->ch = ch;
|
||||||
ret = this->input_state_rule( ch );
|
return anywhere;
|
||||||
}
|
}
|
||||||
}
|
/* Normal X.364 state machine. */
|
||||||
|
/* Parse high Unicode codepoints like 'A'. */
|
||||||
|
Transition ret = this->input_state_rule( ch >= 0xA0 ? 0x41 : ch );
|
||||||
ret.action->char_present = true;
|
ret.action->char_present = true;
|
||||||
ret.action->ch = ch;
|
ret.action->ch = ch;
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user