#include <boost/multi_index_container.hpp>
#include <boost/multi_index/identity.hpp>
#include <boost/multi_index/sequenced_index.hpp>
+#include <utility>
using namespace boost::multi_index;
#include <unistd.h>
struct RemoveSentinel
{
- explicit RemoveSentinel(const DNSName& dn, CommunicatorClass* cc) :
- d_dn(dn), d_cc(cc)
+ explicit RemoveSentinel(DNSName dn, CommunicatorClass* cc) :
+ d_dn(std::move(dn)), d_cc(cc)
{}
~RemoveSentinel()
class BackendFactory
{
public:
- BackendFactory(const string& name) :
- d_name(name) {}
+ BackendFactory(string name) :
+ d_name(std::move(name)) {}
virtual ~BackendFactory() = default;
virtual DNSBackend* make(const string& suffix) = 0;
virtual DNSBackend* makeMetadataOnly(const string& suffix)
#include <cstring>
#include <optional>
#include <string>
+#include <utility>
#include <vector>
#include <set>
#include <strings.h>
template<typename T>
struct SuffixMatchTree
{
- SuffixMatchTree(const std::string& name="", bool endNode_=false) : d_name(name), endNode(endNode_)
+ SuffixMatchTree(std::string name = "", bool endNode_ = false) :
+ d_name(std::move(name)), endNode(endNode_)
{}
SuffixMatchTree(const SuffixMatchTree& rhs): d_name(rhs.d_name), children(rhs.children), endNode(rhs.endNode)
#include "rcpgenerator.hh"
#include <set>
#include <bitset>
+#include <utility>
#include "namespaces.hh"
#include "iputils.hh"
#include "svc-records.hh"
class NSRecordContent : public DNSRecordContent
{
public:
- includeboilerplate(NS)
- explicit NSRecordContent(const DNSName& content) : d_content(content){}
+ includeboilerplate(NS) explicit NSRecordContent(DNSName content) :
+ d_content(std::move(content)) {}
const DNSName& getNS() const { return d_content; }
bool operator==(const DNSRecordContent& rhs) const override
{
class PTRRecordContent : public DNSRecordContent
{
public:
- includeboilerplate(PTR)
- explicit PTRRecordContent(const DNSName& content) : d_content(content){}
+ includeboilerplate(PTR) explicit PTRRecordContent(DNSName content) :
+ d_content(std::move(content)) {}
const DNSName& getContent() const { return d_content; }
[[nodiscard]] size_t sizeEstimate() const override
{
{
public:
includeboilerplate(CNAME)
- CNAMERecordContent(const DNSName& content) : d_content(content){}
+ CNAMERecordContent(DNSName content) :
+ d_content(std::move(content)) {}
DNSName getTarget() const { return d_content; }
[[nodiscard]] size_t sizeEstimate() const override
{
{
public:
includeboilerplate(DNAME)
- DNAMERecordContent(const DNSName& content) : d_content(content){}
+ DNAMERecordContent(DNSName content) :
+ d_content(std::move(content)) {}
const DNSName& getTarget() const { return d_content; }
[[nodiscard]] size_t sizeEstimate() const override
{
#pragma once
#include "namespaces.hh"
#include <boost/variant/variant.hpp>
+#include <utility>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
std::string d_include_path; // path where scripts to include at postLoad are
public:
- BaseLua4(const std::string &includePath) : d_include_path(includePath) {};
+ BaseLua4(std::string includePath) :
+ d_include_path(std::move(includePath)) {};
void loadFile(const std::string &fname, bool doPostLoad=true);
void loadString(const std::string &script);
void loadStream(std::istream &stream, bool doPostLoad=true);
#include <stdexcept>
#include <string>
#include <cctype>
+#include <utility>
#include <vector>
#include "namespaces.hh"
class SimpleMatch
{
public:
- SimpleMatch(const string &mask, bool caseFold = false): d_mask(mask), d_fold(caseFold)
+ SimpleMatch(string mask, bool caseFold = false) :
+ d_mask(std::move(mask)), d_fold(caseFold)
{
}
*/
#pragma once
#include<string>
+#include <utility>
#include "namespaces.hh"
{
public:
PDNSException() : reason("Unspecified") {};
- PDNSException(const string& r) : reason(r) {};
-
+ PDNSException(string r) :
+ reason(std::move(r)) {};
+
string reason; //! Print this to tell the user what went wrong
};
#include <boost/utility.hpp>
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
+#include <utility>
#include <yahttp/yahttp.hpp>
#pragma GCC diagnostic pop
class HttpRequest : public YaHTTP::Request {
public:
- HttpRequest(const string& logprefix_="") : YaHTTP::Request(), logprefix(logprefix_) { };
+ HttpRequest(string logprefix_ = "") :
+ YaHTTP::Request(), logprefix(std::move(logprefix_)) {};
string logprefix;
bool accept_yaml{false};