mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-11 01:48:07 +00:00
refactor: Rewrite BehaviorMessage classes to use member initialization, preferred member naming conventions, and const-ref getters (#1456)
* Split out BehaviorMessage class changes from PR #1452 * remove <string_view> inclusion in ActionContext.h * add the arguments nullptr check back in * remove redundant std::string constructor calls * Update AddStripMessage.cpp - change push_back to emplace_back
This commit is contained in:
@@ -13,14 +13,18 @@ class AMFArrayValue;
|
||||
*/
|
||||
class AddActionMessage : public BehaviorMessageBase {
|
||||
public:
|
||||
AddActionMessage(AMFArrayValue* arguments);
|
||||
int32_t GetActionIndex() const { return actionIndex; };
|
||||
Action GetAction() const { return action; };
|
||||
ActionContext GetActionContext() const { return actionContext; };
|
||||
AddActionMessage(const AMFArrayValue* arguments);
|
||||
|
||||
[[nodiscard]] int32_t GetActionIndex() const noexcept { return m_ActionIndex; };
|
||||
|
||||
[[nodiscard]] const Action& GetAction() const noexcept { return m_Action; };
|
||||
|
||||
[[nodiscard]] const ActionContext& GetActionContext() const noexcept { return m_ActionContext; };
|
||||
|
||||
private:
|
||||
int32_t actionIndex = -1;
|
||||
ActionContext actionContext;
|
||||
Action action;
|
||||
int32_t m_ActionIndex{ -1 };
|
||||
ActionContext m_ActionContext;
|
||||
Action m_Action;
|
||||
};
|
||||
|
||||
#endif //!__ADDACTIONMESSAGE__H__
|
||||
|
Reference in New Issue
Block a user