const correctness

main
Brett 2023-10-27 13:39:00 -04:00
parent a16cd8619d
commit 3c5236d5d4
2 changed files with 3 additions and 3 deletions

View File

@ -125,7 +125,7 @@ namespace blt
* @param out buffer to write to * @param out buffer to write to
* @param out_size size of data that was written. Make sure `out` has enough room for the packet. * @param out_size size of data that was written. Make sure `out` has enough room for the packet.
*/ */
void sendUDPMessage(const std::string& host, const unsigned char*& in, size_t in_size, blt::scoped_buffer<unsigned char>& out, void sendUDPMessage(const std::string& host, const unsigned char* const& in, size_t in_size, blt::scoped_buffer<unsigned char>& out,
size_t& out_size) size_t& out_size)
{ {
asio::io_context io_context; asio::io_context io_context;
@ -148,7 +148,7 @@ namespace blt
* @param out buffer to write to * @param out buffer to write to
* @param out_size size of data that was written. Make sure `out` has enough room for the packet. * @param out_size size of data that was written. Make sure `out` has enough room for the packet.
*/ */
void sendTCPMessage(const std::string& host, const unsigned char*& in, size_t in_size, blt::scoped_buffer<unsigned char>& out, void sendTCPMessage(const std::string& host, const unsigned char* const& in, size_t in_size, blt::scoped_buffer<unsigned char>& out,
size_t& out_size) size_t& out_size)
{ {
asio::io_context io_context; asio::io_context io_context;

View File

@ -345,7 +345,7 @@ request_info handle_forward_request(MESSENGER messenger, const INFO& info, const
// forward to google. // forward to google.
size_t out_bytes; size_t out_bytes;
auto data = input_recv_buffer.data(); const auto* const data = input_recv_buffer.data();
messenger(DNS_SERVER_IP(), data, bytes, forward_recv_buffer, out_bytes); messenger(DNS_SERVER_IP(), data, bytes, forward_recv_buffer, out_bytes);
uint16_t num_of_answers; uint16_t num_of_answers;