mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-01 07:52:37 +00:00
ExpressionParser: replace bare pointers with unique_ptrs
This commit is contained in:
parent
c33e391d26
commit
3df945f8d0
3 changed files with 41 additions and 39 deletions
|
@ -51,13 +51,12 @@ class ExpressionNode;
|
|||
class Expression
|
||||
{
|
||||
public:
|
||||
Expression() : node(nullptr) {}
|
||||
Expression(ExpressionNode* node);
|
||||
explicit Expression(std::unique_ptr<ExpressionNode>&& node = {});
|
||||
~Expression();
|
||||
ControlState GetValue() const;
|
||||
void SetValue(ControlState state);
|
||||
int num_controls;
|
||||
ExpressionNode* node;
|
||||
std::unique_ptr<ExpressionNode> node;
|
||||
};
|
||||
|
||||
enum class ParseStatus
|
||||
|
@ -67,6 +66,7 @@ enum class ParseStatus
|
|||
NoDevice,
|
||||
};
|
||||
|
||||
std::pair<ParseStatus, Expression*> ParseExpression(const std::string& expr, ControlFinder& finder);
|
||||
std::pair<ParseStatus, std::unique_ptr<Expression>> ParseExpression(const std::string& expr,
|
||||
ControlFinder& finder);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue