mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
ControlReference: hide parse_error behind GetParseStatus()
This commit is contained in:
@ -33,13 +33,14 @@ void ControlReference::UpdateReference(ciface::Core::DeviceContainer& devices,
|
||||
parsed_expression = nullptr;
|
||||
|
||||
ControlFinder finder(devices, default_device, IsInput());
|
||||
parse_error = ParseExpression(expression, finder, &parsed_expression);
|
||||
m_parse_status = ParseExpression(expression, finder, &parsed_expression);
|
||||
}
|
||||
|
||||
ControlReference::~ControlReference()
|
||||
{
|
||||
delete parsed_expression;
|
||||
}
|
||||
|
||||
int ControlReference::BoundCount() const
|
||||
{
|
||||
if (parsed_expression)
|
||||
@ -48,6 +49,11 @@ int ControlReference::BoundCount() const
|
||||
return 0;
|
||||
}
|
||||
|
||||
ExpressionParseStatus ControlReference::GetParseStatus() const
|
||||
{
|
||||
return m_parse_status;
|
||||
}
|
||||
|
||||
ControlReference::ControlReference() : range(1), parsed_expression(nullptr)
|
||||
{
|
||||
}
|
||||
|
@ -29,16 +29,17 @@ public:
|
||||
virtual bool IsInput() const = 0;
|
||||
|
||||
int BoundCount() const;
|
||||
ciface::ExpressionParser::ExpressionParseStatus GetParseStatus() const;
|
||||
void UpdateReference(ciface::Core::DeviceContainer& devices,
|
||||
const ciface::Core::DeviceQualifier& default_device);
|
||||
|
||||
ControlState range;
|
||||
std::string expression;
|
||||
ciface::ExpressionParser::ExpressionParseStatus parse_error;
|
||||
|
||||
protected:
|
||||
ControlReference();
|
||||
ciface::ExpressionParser::Expression* parsed_expression;
|
||||
ciface::ExpressionParser::ExpressionParseStatus m_parse_status;
|
||||
};
|
||||
|
||||
//
|
||||
|
Reference in New Issue
Block a user