From: Otto Moerbeek Date: Wed, 30 Nov 2022 14:12:28 +0000 (+0100) Subject: Drop ref from string_view arg X-Git-Tag: dnsdist-1.8.0-rc1~209^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F11863%2Fhead;p=thirdparty%2Fpdns.git Drop ref from string_view arg --- diff --git a/pdns/dnsname.cc b/pdns/dnsname.cc index dd3c1ccef5..3bfbf3007f 100644 --- a/pdns/dnsname.cc +++ b/pdns/dnsname.cc @@ -53,7 +53,7 @@ void DNSName::throwSafeRangeError(const std::string& msg, const char* buf, size_ throw std::range_error(msg + label + dots); } -DNSName::DNSName(const std::string_view& sw) +DNSName::DNSName(const std::string_view sw) { const char* p = sw.data(); size_t length = sw.length(); diff --git a/pdns/dnsname.hh b/pdns/dnsname.hh index 18b1e27159..29c8325c5d 100644 --- a/pdns/dnsname.hh +++ b/pdns/dnsname.hh @@ -99,7 +99,7 @@ public: DNSName(const DNSName& a) = default; DNSName(DNSName&& a) = default; - explicit DNSName(const std::string_view& sw); //!< Constructs from a human formatted, escaped presentation + explicit DNSName(std::string_view sw); //!< Constructs from a human formatted, escaped presentation DNSName(const char* p, int len, int offset, bool uncompress, uint16_t* qtype=nullptr, uint16_t* qclass=nullptr, unsigned int* consumed=nullptr, uint16_t minOffset=0); //!< Construct from a DNS Packet, taking the first question if offset=12. If supplied, consumed is set to the number of bytes consumed from the packet, which will not be equal to the wire length of the resulting name in case of compression. bool isPartOf(const DNSName& rhs) const; //!< Are we part of the rhs name? Note that name.isPartOf(name).