From 2d872f6fb68350f9ee5b0b5c86ab3240b0d09aae Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 3 Dec 2023 00:48:17 +0900 Subject: Replaced various '#define' with actual strings - part 5 Signed-off-by: Michele Calgaro --- libtdegames/kgame/kmessageclient.cpp | 4 ++-- libtdegames/kgame/kmessageserver.cpp | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'libtdegames/kgame') diff --git a/libtdegames/kgame/kmessageclient.cpp b/libtdegames/kgame/kmessageclient.cpp index 8c9278b6..eddd6f9f 100644 --- a/libtdegames/kgame/kmessageclient.cpp +++ b/libtdegames/kgame/kmessageclient.cpp @@ -155,7 +155,7 @@ void KMessageClient::sendBroadcast (const TQByteArray &msg) TQDataStream stream (&buffer); stream << static_cast ( KMessageServer::REQ_BROADCAST ); - TQT_TQIODEVICE(&buffer)->writeBlock (msg); + buffer.writeBlock (msg); sendServerMessage (sendBuffer); } @@ -167,7 +167,7 @@ void KMessageClient::sendForward (const TQByteArray &msg, const TQValueList ( KMessageServer::REQ_FORWARD ) << clients; - TQT_TQIODEVICE(&buffer)->writeBlock (msg); + buffer.writeBlock (msg); sendServerMessage (sendBuffer); } diff --git a/libtdegames/kgame/kmessageserver.cpp b/libtdegames/kgame/kmessageserver.cpp index 0ea66dda..cd5da802 100644 --- a/libtdegames/kgame/kmessageserver.cpp +++ b/libtdegames/kgame/kmessageserver.cpp @@ -415,10 +415,7 @@ void KMessageServer::processOneMessage () { case REQ_BROADCAST: out_stream << TQ_UINT32 (MSG_BROADCAST) << clientID; - // FIXME, compiler bug? - // this should be okay, since TQBuffer is subclass of TQIODevice! : - // out_buffer.writeBlock (in_buffer.readAll()); - TQT_TQIODEVICE(&out_buffer)->writeBlock (in_buffer.readAll()); + out_buffer.writeBlock (in_buffer.readAll()); broadcastMessage (out_msg); break; @@ -427,8 +424,7 @@ void KMessageServer::processOneMessage () TQValueList clients; in_stream >> clients; out_stream << TQ_UINT32 (MSG_FORWARD) << clientID << clients; - // see above! - TQT_TQIODEVICE(&out_buffer)->writeBlock (in_buffer.readAll()); + out_buffer.writeBlock (in_buffer.readAll()); sendMessage (clients, out_msg); } break; -- cgit v1.2.1