diff --git a/src/realmd/AuthSocket.cpp b/src/realmd/AuthSocket.cpp index 2c7ae38f306..23b6ed56496 100644 --- a/src/realmd/AuthSocket.cpp +++ b/src/realmd/AuthSocket.cpp @@ -1018,7 +1018,7 @@ void AuthSocket::_HandleReconnectChallenge() // Escape the user input used in DB to avoid further SQL injection // Memory will be freed on AuthSocket object destruction - self->m_login = (const char*)body->username; + self->m_login = (char const*)body->username; self->m_safelogin = self->m_login; LoginDatabase.escape_string(self->m_safelogin); @@ -1406,9 +1406,10 @@ bool AuthSocket::VerifyPinData(uint32 pin, PINData const& clientData) return !memcmp(hash.AsDecStr(), clientHash.AsDecStr(), 20); } -uint32 AuthSocket::GenerateTotpPin(const std::string& secret, int interval) { +uint32 AuthSocket::GenerateTotpPin(std::string const& secret, int interval) +{ std::vector decoded_key((secret.size() + 7) / 8 * 5); - int key_size = base32_decode((const uint8_t*)secret.data(), decoded_key.data(), decoded_key.size()); + int key_size = base32_decode((uint8_t const*)secret.data(), decoded_key.data(), decoded_key.size()); if (key_size == -1) { diff --git a/src/realmd/AuthSocket.h b/src/realmd/AuthSocket.h index 442211f9d7e..4c5d89d0809 100644 --- a/src/realmd/AuthSocket.h +++ b/src/realmd/AuthSocket.h @@ -69,7 +69,7 @@ class AuthSocket : public IO::Networking::AsyncSocket std::shared_ptr GenerateLogonProofResponse(Sha1Hash sha); void LoadRealmlistAndWriteIntoBuffer(ByteBuffer &pkt); bool VerifyPinData(uint32 pin, PINData const& clientData); - uint32 GenerateTotpPin(const std::string& secret, int interval); + uint32 GenerateTotpPin(std::string const& secret, int interval); void _HandleLogonChallenge(); void _HandleLogonProof(); diff --git a/src/shared/IO/Filesystem/FileHandle.h b/src/shared/IO/Filesystem/FileHandle.h index af615596caf..5c27066055c 100644 --- a/src/shared/IO/Filesystem/FileHandle.h +++ b/src/shared/IO/Filesystem/FileHandle.h @@ -16,8 +16,8 @@ namespace IO { namespace Filesystem { { public: ~FileHandle(); - FileHandle(const FileHandle&) = delete; - FileHandle& operator=(const FileHandle&) = delete; + FileHandle(FileHandle const&) = delete; + FileHandle& operator=(FileHandle const&) = delete; FileHandle(FileHandle&&) = delete; FileHandle& operator=(FileHandle&&) = delete; @@ -39,8 +39,8 @@ namespace IO { namespace Filesystem { { public: explicit FileHandleReadonly(HANDLE nativeFileHandle) : FileHandle(nativeFileHandle) {}; - FileHandleReadonly(const FileHandleReadonly&) = delete; - FileHandleReadonly& operator=(const FileHandleReadonly&) = delete; + FileHandleReadonly(FileHandleReadonly const&) = delete; + FileHandleReadonly& operator=(FileHandleReadonly const&) = delete; FileHandleReadonly(FileHandleReadonly&&) = delete; FileHandleReadonly& operator=(FileHandleReadonly&&) = delete; diff --git a/src/shared/IO/Networking/impl/windows/AsyncServerListener.h b/src/shared/IO/Networking/impl/windows/AsyncServerListener.h index b8636c64af9..0785da6a7e1 100644 --- a/src/shared/IO/Networking/impl/windows/AsyncServerListener.h +++ b/src/shared/IO/Networking/impl/windows/AsyncServerListener.h @@ -15,8 +15,8 @@ class AsyncServerListener { explicit AsyncServerListener(SOCKET acceptorNativeSocket, HANDLE completionPort) : m_acceptorNativeSocket(acceptorNativeSocket), m_completionPort(completionPort) {} - AsyncServerListener(const AsyncServerListener&) = delete; - AsyncServerListener& operator=(const AsyncServerListener&) = delete; + AsyncServerListener(AsyncServerListener const&) = delete; + AsyncServerListener& operator=(AsyncServerListener const&) = delete; AsyncServerListener(AsyncServerListener&&) = delete; AsyncServerListener& operator=(AsyncServerListener&&) = delete; diff --git a/src/shared/IO/Networking/impl/windows/AsyncSocket.h b/src/shared/IO/Networking/impl/windows/AsyncSocket.h index 1fdf75895a6..4e28fe9b88e 100644 --- a/src/shared/IO/Networking/impl/windows/AsyncSocket.h +++ b/src/shared/IO/Networking/impl/windows/AsyncSocket.h @@ -23,8 +23,8 @@ namespace IO { namespace Networking { public: explicit AsyncSocket(SocketDescriptor const& socketDescriptor) : m_socket(socketDescriptor) {} ~AsyncSocket(); - AsyncSocket(const AsyncSocket&) = delete; - AsyncSocket& operator=(const AsyncSocket&) = delete; + AsyncSocket(AsyncSocket const&) = delete; + AsyncSocket& operator=(AsyncSocket const&) = delete; AsyncSocket(AsyncSocket&&) = delete; AsyncSocket& operator=(AsyncSocket&&) = delete; diff --git a/src/shared/IO/Timer/impl/windows/AsyncSystemTimer.h b/src/shared/IO/Timer/impl/windows/AsyncSystemTimer.h index 42e16397a8f..8b5d949e7c5 100644 --- a/src/shared/IO/Timer/impl/windows/AsyncSystemTimer.h +++ b/src/shared/IO/Timer/impl/windows/AsyncSystemTimer.h @@ -17,8 +17,8 @@ namespace IO { namespace Timer { namespace impl { namespace windows { public: explicit AsyncSystemTimer(); ~AsyncSystemTimer() = default; - AsyncSystemTimer(const AsyncSystemTimer&) = delete; - AsyncSystemTimer& operator=(const AsyncSystemTimer&) = delete; + AsyncSystemTimer(AsyncSystemTimer const&) = delete; + AsyncSystemTimer& operator=(AsyncSystemTimer const&) = delete; AsyncSystemTimer(AsyncSystemTimer&&) = delete; AsyncSystemTimer& operator=(AsyncSystemTimer&&) = delete;