From 3a7fa1660c3d78f1f80f3502a8dae77642d3c3f9 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 12 Mar 2006 16:56:02 +0000 Subject: Const refs (this is about the last of them in the core api) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3694 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/ctables.h | 2 +- include/dns.h | 10 +++++----- include/dnsqueue.h | 2 +- include/inspircd_io.h | 2 +- include/u_listmode.h | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/ctables.h b/include/ctables.h index 7fca885bc..d98e1701d 100644 --- a/include/ctables.h +++ b/include/ctables.h @@ -59,7 +59,7 @@ class command_t */ std::string source; - command_t(std::string cmd, char flags, int minpara) : command(cmd), flags_needed(flags), min_params(minpara) + command_t(const std::string &cmd, char flags, int minpara) : command(cmd), flags_needed(flags), min_params(minpara) { use_count = total_bytes = 0; source = ""; diff --git a/include/dns.h b/include/dns.h index 91e655775..cdc1fd024 100644 --- a/include/dns.h +++ b/include/dns.h @@ -65,7 +65,7 @@ public: /** This constructor accepts a dns server address. The address must be in dotted * decimal form, e.g. 1.2.3.4. */ - DNS(std::string dnsserver); + DNS(const std::string &dnsserver); /** The destructor frees all used structures. */ ~DNS(); @@ -73,14 +73,14 @@ public: * format, e.g. 1.2.3.4, and returns true if the lookup was successfully * initiated. */ - bool ReverseLookup(std::string ip); + bool ReverseLookup(const std::string &ip); /** This method will start the forward lookup of a hostname, e.g. www.inspircd.org, * and returns true if the lookup was successfully initiated. */ - bool ForwardLookup(std::string host); + bool ForwardLookup(const std::string &host); /** Used by modules to perform a dns lookup but have the socket engine poll a module, instead of the dns object directly. */ - bool ForwardLookupWithFD(std::string host, int &fd); + bool ForwardLookupWithFD(const std::string &host, int &fd); /** This method will return true when the lookup is completed. It uses poll internally * to determine the status of the socket. */ @@ -97,7 +97,7 @@ public: * query is invalid for some reason, e.g. the dns server not responding. */ int GetFD(); - void SetNS(std::string dnsserver); + void SetNS(const std::string &dnsserver); }; /** This is the handler function for multi-threaded DNS. diff --git a/include/dnsqueue.h b/include/dnsqueue.h index f251dcaa2..2b3217847 100644 --- a/include/dnsqueue.h +++ b/include/dnsqueue.h @@ -1,5 +1,5 @@ #include "inspircd.h" #include "users.h" -bool lookup_dns(std::string nick); +bool lookup_dns(const std::string &nick); void dns_poll(int fdcheck); diff --git a/include/inspircd_io.h b/include/inspircd_io.h index ac0587177..e4b5f98a3 100644 --- a/include/inspircd_io.h +++ b/include/inspircd_io.h @@ -372,7 +372,7 @@ int DaemonSeed (void); bool FileExists (const char* file); int OpenTCPSocket (void); int BindSocket (int sockfd, struct sockaddr_in client, struct sockaddr_in server, int port, char* addr); -void WritePID(std::string filename); +void WritePID(const std::string &filename); int BindPorts(); char* CleanFilename(char* name); diff --git a/include/u_listmode.h b/include/u_listmode.h index bd212c528..a41f30e68 100644 --- a/include/u_listmode.h +++ b/include/u_listmode.h @@ -56,7 +56,7 @@ protected: Server* Srv; ConfigReader* Conf; public: - ListModeBaseModule(Server* serv, char modechar, std::string eolstr, std::string lnum, std::string eolnum) : Module::Module(serv) + ListModeBaseModule(Server* serv, char modechar, const std::string &eolstr, const std::string &lnum, const std::string &eolnum) : Module::Module(serv) { Srv = serv; Conf = new ConfigReader; -- cgit v1.2.3