diff --git a/L2BotCore/Domain/Entities/Drop.h b/L2BotCore/Domain/Entities/Drop.h index 53de08e..250a969 100644 --- a/L2BotCore/Domain/Entities/Drop.h +++ b/L2BotCore/Domain/Entities/Drop.h @@ -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), diff --git a/L2BotCore/Domain/Serializers/Node.h b/L2BotCore/Domain/Serializers/Node.h index 292a0ea..1251469 100644 --- a/L2BotCore/Domain/Serializers/Node.h +++ b/L2BotCore/Domain/Serializers/Node.h @@ -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 children, const bool isArray = false) : + Node(const std::string& name, const std::vector children, const bool isArray = false) : name(name), children(children), isArray(isArray), isContainer(true) { } diff --git a/L2BotCore/Domain/Serializers/SerializableStateContainer.h b/L2BotCore/Domain/Serializers/SerializableStateContainer.h index fe4ec94..b53db33 100644 --- a/L2BotCore/Domain/Serializers/SerializableStateContainer.h +++ b/L2BotCore/Domain/Serializers/SerializableStateContainer.h @@ -42,7 +42,7 @@ namespace L2Bot::Domain::Serializers return result; } - SerializableStateContainer(const std::vector> objects, const std::string containerName) : + SerializableStateContainer(const std::vector> objects, const std::string& containerName) : m_Objects(objects), m_ContainerName(containerName) { diff --git a/L2BotCore/Domain/Transports/TransportInterface.h b/L2BotCore/Domain/Transports/TransportInterface.h index 1f4ee79..a37a330 100644 --- a/L2BotCore/Domain/Transports/TransportInterface.h +++ b/L2BotCore/Domain/Transports/TransportInterface.h @@ -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; }; } diff --git a/L2BotCore/Domain/ValueObjects/BaseItem.h b/L2BotCore/Domain/ValueObjects/BaseItem.h index 126c9c0..cc25dc9 100644 --- a/L2BotCore/Domain/ValueObjects/BaseItem.h +++ b/L2BotCore/Domain/ValueObjects/BaseItem.h @@ -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), diff --git a/L2BotCore/Domain/ValueObjects/FullName.h b/L2BotCore/Domain/ValueObjects/FullName.h index 4c727fb..758ea21 100644 --- a/L2BotCore/Domain/ValueObjects/FullName.h +++ b/L2BotCore/Domain/ValueObjects/FullName.h @@ -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) diff --git a/L2BotDll/Events/EventDispatcher.h b/L2BotDll/Events/EventDispatcher.h index 272aa6e..ab36cf7 100644 --- a/L2BotDll/Events/EventDispatcher.h +++ b/L2BotDll/Events/EventDispatcher.h @@ -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); } diff --git a/L2BotDll/Transports/DebugViewTransport.h b/L2BotDll/Transports/DebugViewTransport.h index 367c343..e716fa9 100644 --- a/L2BotDll/Transports/DebugViewTransport.h +++ b/L2BotDll/Transports/DebugViewTransport.h @@ -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()); } diff --git a/L2BotDll/Transports/NamedPipeTransport.h b/L2BotDll/Transports/NamedPipeTransport.h index 3f25985..f079eb3 100644 --- a/L2BotDll/Transports/NamedPipeTransport.h +++ b/L2BotDll/Transports/NamedPipeTransport.h @@ -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()) {