diff options
-rw-r--r-- | include/anope.h | 3 | ||||
-rw-r--r-- | include/modules/sql.h | 2 | ||||
-rw-r--r-- | modules/encryption/enc_sha256.cpp | 1 | ||||
-rw-r--r-- | modules/m_xmlrpc_main.cpp | 8 | ||||
-rw-r--r-- | modules/protocol/inspircd3.cpp | 2 |
5 files changed, 11 insertions, 5 deletions
diff --git a/include/anope.h b/include/anope.h index fe2b96a42..ccffa8c6c 100644 --- a/include/anope.h +++ b/include/anope.h @@ -54,6 +54,9 @@ namespace Anope string(const ci::string &_str) : _string(_str.c_str()) { } string(const string &_str, size_type pos, size_type n = npos) : _string(_str._string, pos, n) { } template <class InputIterator> string(InputIterator first, InputIterator last) : _string(first, last) { } +#if __cplusplus >= 201103L + string(const string &) = default; +#endif /** * Assignment operators, so any type of string can be assigned to this class. diff --git a/include/modules/sql.h b/include/modules/sql.h index e2e01e20e..c9849a8a5 100644 --- a/include/modules/sql.h +++ b/include/modules/sql.h @@ -149,7 +149,7 @@ namespace SQL inline operator bool() const { return this->error.empty(); } - inline const unsigned int GetID() const { return this->id; } + inline unsigned int GetID() const { return this->id; } inline const Query &GetQuery() const { return this->query; } inline const Anope::string &GetError() const { return this->error; } diff --git a/modules/encryption/enc_sha256.cpp b/modules/encryption/enc_sha256.cpp index b425d6b9d..da3822602 100644 --- a/modules/encryption/enc_sha256.cpp +++ b/modules/encryption/enc_sha256.cpp @@ -55,7 +55,6 @@ static const unsigned SHA256_BLOCK_SIZE = 512 / 8; inline static uint32_t SHFR(uint32_t x, uint32_t n) { return x >> n; } inline static uint32_t ROTR(uint32_t x, uint32_t n) { return (x >> n) | (x << ((sizeof(x) << 3) - n)); } -inline static uint32_t ROTL(uint32_t x, uint32_t n) { return (x << n) | (x >> ((sizeof(x) << 3) - n)); } inline static uint32_t CH(uint32_t x, uint32_t y, uint32_t z) { return (x & y) ^ (~x & z); } inline static uint32_t MAJ(uint32_t x, uint32_t y, uint32_t z) { return (x & y) ^ (x & z) ^ (y & z); } diff --git a/modules/m_xmlrpc_main.cpp b/modules/m_xmlrpc_main.cpp index 08c27a9a7..6259a14b8 100644 --- a/modules/m_xmlrpc_main.cpp +++ b/modules/m_xmlrpc_main.cpp @@ -253,9 +253,13 @@ class MyXMLRPCEvent : public XMLRPCEvent { OperType *ot = Config->MyOperTypes[i]; Anope::string perms; - for (std::list<Anope::string>::const_iterator it2 = ot->GetPrivs().begin(), it2_end = ot->GetPrivs().end(); it2 != it2_end; ++it2) + + std::list<Anope::string> privs = ot->GetPrivs(); + for (std::list<Anope::string>::const_iterator it2 = privs.begin(), it2_end = privs.end(); it2 != it2_end; ++it2) perms += " " + *it2; - for (std::list<Anope::string>::const_iterator it2 = ot->GetCommands().begin(), it2_end = ot->GetCommands().end(); it2 != it2_end; ++it2) + + std::list<Anope::string> commands = ot->GetCommands(); + for (std::list<Anope::string>::const_iterator it2 = commands.begin(), it2_end = commands.end(); it2 != it2_end; ++it2) perms += " " + *it2; request.reply(ot->GetName(), perms); } diff --git a/modules/protocol/inspircd3.cpp b/modules/protocol/inspircd3.cpp index 8aae15e67..52f6b5b87 100644 --- a/modules/protocol/inspircd3.cpp +++ b/modules/protocol/inspircd3.cpp @@ -75,7 +75,7 @@ class InspIRCd3Proto : public IRCDProto MaxLine = 4096; } - unsigned GetMaxListFor(Channel *c, ChannelMode *cm) + unsigned GetMaxListFor(Channel *c, ChannelMode *cm) anope_override { ListLimits *limits = maxlist.Get(c); if (limits) |