DEV9: Fix Function parameter should be passed by const reference warnings

Codacy.
This commit is contained in:
lightningterror 2023-12-08 13:25:36 +01:00
parent b7aea5b726
commit 47545e511d
2 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ namespace PacketReader::IP::UDP::DNS
//null char //null char
*offset += 1; *offset += 1;
} }
void DNS_QuestionEntry::WriteDNS_String(u8* buffer, int* offset, std::string value) void DNS_QuestionEntry::WriteDNS_String(u8* buffer, int* offset, const std::string& value)
{ {
int segmentLength = 0; int segmentLength = 0;
int segmentStart = 0; int segmentStart = 0;

View File

@ -36,7 +36,7 @@ namespace PacketReader::IP::UDP::DNS
private: private:
void ReadDNS_String(u8* buffer, int* offset, std::string* value); void ReadDNS_String(u8* buffer, int* offset, std::string* value);
void WriteDNS_String(u8* buffer, int* offset, std::string value); void WriteDNS_String(u8* buffer, int* offset, const std::string& value);
}; };
class DNS_ResponseEntry : public DNS_QuestionEntry class DNS_ResponseEntry : public DNS_QuestionEntry