refactor: switch strings to string references
This commit is contained in:
parent
9592833ddf
commit
e127d94902
@ -52,8 +52,8 @@ namespace L2Bot::Domain::Entities
|
||||
const ValueObjects::Transform transform,
|
||||
const uint32_t itemId,
|
||||
const uint32_t amount,
|
||||
const std::string name,
|
||||
const std::string iconName
|
||||
const std::string& name,
|
||||
const std::string& iconName
|
||||
) :
|
||||
WorldObject(id, transform),
|
||||
m_ItemId(itemId),
|
||||
|
@ -14,11 +14,11 @@ namespace L2Bot::Domain::Serializers
|
||||
const bool isContainer = false;
|
||||
|
||||
Node() = delete;
|
||||
Node(const std::string name, const std::string value) :
|
||||
Node(const std::string& name, const std::string& value) :
|
||||
name(name), value(value)
|
||||
{
|
||||
}
|
||||
Node(const std::string name, const std::vector<Node> children, const bool isArray = false) :
|
||||
Node(const std::string& name, const std::vector<Node> children, const bool isArray = false) :
|
||||
name(name), children(children), isArray(isArray), isContainer(true)
|
||||
{
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ namespace L2Bot::Domain::Serializers
|
||||
return result;
|
||||
}
|
||||
|
||||
SerializableStateContainer(const std::vector<std::shared_ptr<DTO::EntityState>> objects, const std::string containerName) :
|
||||
SerializableStateContainer(const std::vector<std::shared_ptr<DTO::EntityState>> objects, const std::string& containerName) :
|
||||
m_Objects(objects), m_ContainerName(containerName)
|
||||
{
|
||||
|
||||
|
@ -8,7 +8,7 @@ namespace L2Bot::Domain::Transports
|
||||
public:
|
||||
virtual const bool Connect() = 0;
|
||||
virtual const bool IsConnected() const = 0;
|
||||
virtual const void Send(std::string data) = 0;
|
||||
virtual const void Send(const std::string& data) = 0;
|
||||
virtual const std::string Receive() = 0;
|
||||
};
|
||||
}
|
||||
|
@ -97,9 +97,9 @@ namespace L2Bot::Domain::ValueObjects
|
||||
const bool isEquipped,
|
||||
const uint16_t enchantLevel,
|
||||
const int32_t mana,
|
||||
const std::string name,
|
||||
const std::string iconName,
|
||||
const std::string description,
|
||||
const std::string& name,
|
||||
const std::string& iconName,
|
||||
const std::string& description,
|
||||
const uint16_t weight
|
||||
) :
|
||||
m_ItemId(itemId),
|
||||
|
@ -30,8 +30,8 @@ namespace L2Bot::Domain::ValueObjects
|
||||
}
|
||||
|
||||
FullName(
|
||||
const std::string nickname,
|
||||
const std::string title
|
||||
const std::string& nickname,
|
||||
const std::string& title
|
||||
) :
|
||||
m_Nickname(nickname),
|
||||
m_Title(title)
|
||||
|
@ -31,7 +31,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void Subscribe(std::string eventName, Delegate handler)
|
||||
void Subscribe(const std::string& eventName, const Delegate handler)
|
||||
{
|
||||
m_Handlers[eventName].push_back(handler);
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
const void Send(std::string data) override
|
||||
const void Send(const std::string& data) override
|
||||
{
|
||||
OutputDebugStringA(data.c_str());
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
const void Send(std::string data) override
|
||||
const void Send(const std::string& data) override
|
||||
{
|
||||
if (!m_Pipe.IsConnected())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user