diff --git a/pcsx2/DEV9/PacketReader/IP/UDP/DHCP/DHCP_Options.cpp b/pcsx2/DEV9/PacketReader/IP/UDP/DHCP/DHCP_Options.cpp index 92d5c1ab0d..52f38136c2 100644 --- a/pcsx2/DEV9/PacketReader/IP/UDP/DHCP/DHCP_Options.cpp +++ b/pcsx2/DEV9/PacketReader/IP/UDP/DHCP/DHCP_Options.cpp @@ -66,7 +66,7 @@ namespace PacketReader::IP::UDP::DHCP NetLib::WriteByteArray(buffer, offset, dnsServers.size() * 4, (u8*)&dnsServers[0]); } - DHCPopHostName::DHCPopHostName(std::string name) + DHCPopHostName::DHCPopHostName(const std::string& name) { if (name.size() > 255) { @@ -298,7 +298,7 @@ namespace PacketReader::IP::UDP::DHCP NetLib::WriteByteArray(buffer, offset, requests.size(), &requests[0]); } - DHCPopMSGStr::DHCPopMSGStr(std::string msg) + DHCPopMSGStr::DHCPopMSGStr(const std::string& msg) { if (msg.size() > 255) { @@ -375,7 +375,7 @@ namespace PacketReader::IP::UDP::DHCP NetLib::WriteUInt32(buffer, offset, ipRebindingTimeT2); } - DHCPopClassID::DHCPopClassID(std::string id) + DHCPopClassID::DHCPopClassID(const std::string& id) { if (id.size() > 255) { diff --git a/pcsx2/DEV9/PacketReader/IP/UDP/DHCP/DHCP_Options.h b/pcsx2/DEV9/PacketReader/IP/UDP/DHCP/DHCP_Options.h index 544bda8b2e..5b05143349 100644 --- a/pcsx2/DEV9/PacketReader/IP/UDP/DHCP/DHCP_Options.h +++ b/pcsx2/DEV9/PacketReader/IP/UDP/DHCP/DHCP_Options.h @@ -90,7 +90,7 @@ namespace PacketReader::IP::UDP::DHCP //ASCII encoding std::string hostName; - DHCPopHostName(std::string name); + DHCPopHostName(const std::string& name); DHCPopHostName(u8* data, int offset); //Offset will include Kind and Len virtual u8 GetLength() { return 2 + hostName.size(); } @@ -276,7 +276,7 @@ namespace PacketReader::IP::UDP::DHCP //ASCII encoding std::string message; - DHCPopMSGStr(std::string msg); + DHCPopMSGStr(const std::string& msg); DHCPopMSGStr(u8* data, int offset); //Offset will include Kind and Len virtual u8 GetLength() { return 2 + message.size(); } @@ -353,7 +353,7 @@ namespace PacketReader::IP::UDP::DHCP //ASCII encoding std::string classID; - DHCPopClassID(std::string id); + DHCPopClassID(const std::string& id); DHCPopClassID(u8* data, int offset); //Offset will include Kind and Len virtual u8 GetLength() { return 2 + classID.size(); }