Parcourir la source

[master] a trivial cleanup: remove unnecessary cast.
the orignal code was not good in that
- it used C-style cast
- the cast wasn't necessary in the first place

quite trivial, no behavior change, compile ok, so committing directly.

JINMEI Tatuya il y a 14 ans
Parent
commit
242cb68113
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/lib/asiolink/tcp_server.cc

+ 1 - 1
src/lib/asiolink/tcp_server.cc

@@ -110,7 +110,7 @@ TCPServer::operator()(error_code ec, size_t length) {
         /// Now read the message itself. (This is done in a different scope
         /// to allow inline variable declarations.)
         CORO_YIELD {
-            InputBuffer dnsbuffer((const void *) data_.get(), length);
+            InputBuffer dnsbuffer(data_.get(), length);
             uint16_t msglen = dnsbuffer.readUint16();
             async_read(*socket_, asio::buffer(data_.get(), msglen), *this);
         }