From 0100cb796ea2bd8a8e159e62c1b8f917279f8a06 Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Thu, 3 Jul 2025 12:36:52 -0400 Subject: [PATCH] chore: SecureSocket remove unused MAX_ERROR_SIZE define , rename MAX_INPUT_BUFFER_SIZE static to confirm to naming convention --- src/lib/net/SecureSocket.cpp | 7 ++----- src/lib/net/TCPSocket.cpp | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/lib/net/SecureSocket.cpp b/src/lib/net/SecureSocket.cpp index 4e1f8d702..d21bca71f 100644 --- a/src/lib/net/SecureSocket.cpp +++ b/src/lib/net/SecureSocket.cpp @@ -31,10 +31,7 @@ // // SecureSocket // - -#define MAX_ERROR_SIZE 65535 - -static const std::size_t MAX_INPUT_BUFFER_SIZE = 1024 * 1024; +static const std::size_t s_maxInputBufferSize = 1024 * 1024; static const float s_retryDelay = 0.01f; @@ -142,7 +139,7 @@ TCPSocket::EJobResult SecureSocket::doRead() do { m_inputBuffer.write(buffer, bytesRead); - if (m_inputBuffer.getSize() > MAX_INPUT_BUFFER_SIZE) { + if (m_inputBuffer.getSize() > s_maxInputBufferSize) { break; } diff --git a/src/lib/net/TCPSocket.cpp b/src/lib/net/TCPSocket.cpp index e7f35f56a..8a2e8fb05 100644 --- a/src/lib/net/TCPSocket.cpp +++ b/src/lib/net/TCPSocket.cpp @@ -21,7 +21,7 @@ #include #include -static const std::size_t MAX_INPUT_BUFFER_SIZE = 1024 * 1024; +static const std::size_t s_maxInputBufferSize = 1024 * 1024; // // TCPSocket @@ -311,7 +311,7 @@ TCPSocket::EJobResult TCPSocket::doRead() do { m_inputBuffer.write(buffer, static_cast(bytesRead)); - if (m_inputBuffer.getSize() > MAX_INPUT_BUFFER_SIZE) { + if (m_inputBuffer.getSize() > s_maxInputBufferSize) { break; }