ExpressionParser: Convert parse state enum into an enum class

This commit is contained in:
Lioncash
2017-02-28 04:58:03 -05:00
parent e375c96693
commit d104e5e916
5 changed files with 47 additions and 49 deletions

View File

@ -341,10 +341,10 @@ void ControlDialog::UpdateGUI()
switch (control_reference->GetParseStatus())
{
case EXPRESSION_PARSE_SYNTAX_ERROR:
case ParseStatus::SyntaxError:
m_error_label->SetLabel(_("Syntax error"));
break;
case EXPRESSION_PARSE_NO_DEVICE:
case ParseStatus::NoDevice:
m_error_label->SetLabel(_("Device not found"));
break;
default:
@ -404,8 +404,8 @@ bool ControlDialog::Validate()
UpdateGUI();
return (control_reference->GetParseStatus() == EXPRESSION_PARSE_SUCCESS ||
control_reference->GetParseStatus() == EXPRESSION_PARSE_NO_DEVICE);
const auto parse_status = control_reference->GetParseStatus();
return parse_status == ParseStatus::Success || parse_status == ParseStatus::NoDevice;
}
void InputConfigDialog::SetDevice(wxCommandEvent&)