mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-09 20:24:16 +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:
@@ -9,14 +9,15 @@ class AMFArrayValue;
|
||||
*/
|
||||
class StripUiPosition {
|
||||
public:
|
||||
StripUiPosition();
|
||||
StripUiPosition(AMFArrayValue* arguments, std::string uiKeyName = "ui");
|
||||
StripUiPosition() noexcept = default;
|
||||
StripUiPosition(const AMFArrayValue* arguments, const std::string& uiKeyName = "ui");
|
||||
void SendBehaviorBlocksToClient(AMFArrayValue& args) const;
|
||||
double GetX() const { return xPosition; };
|
||||
double GetY() const { return yPosition; };
|
||||
[[nodiscard]] double GetX() const noexcept { return m_XPosition; }
|
||||
[[nodiscard]] double GetY() const noexcept { return m_YPosition; }
|
||||
|
||||
private:
|
||||
double xPosition;
|
||||
double yPosition;
|
||||
double m_XPosition{ 0.0 };
|
||||
double m_YPosition{ 0.0 };
|
||||
};
|
||||
|
||||
#endif //!__STRIPUIPOSITION__H__
|
||||
|
Reference in New Issue
Block a user