summaryrefslogtreecommitdiffstats
path: root/src/client/vnc/vncthread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/vnc/vncthread.cpp')
-rw-r--r--src/client/vnc/vncthread.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/vnc/vncthread.cpp b/src/client/vnc/vncthread.cpp
index e399e9b..1a903d5 100644
--- a/src/client/vnc/vncthread.cpp
+++ b/src/client/vnc/vncthread.cpp
@@ -89,7 +89,7 @@ void VncThread::run()
_client->frameBuffer = nullptr;
// save this instance in vnc-struct for callbacks
- rfbClientSetClientData(_client, 0, this);
+ rfbClientSetClientData(_client, nullptr, this);
// start client
if (rfbInitClient(_client, nullptr, nullptr)) {
@@ -172,7 +172,7 @@ void VncThread::emitStarted()
*/
char* VncThread::passwdHandler(rfbClient *client)
{
- VncThread* t = (VncThread*)rfbClientGetClientData(client, 0);
+ VncThread* t = reinterpret_cast<VncThread*>(rfbClientGetClientData(client, nullptr));
return strdup(t->_passwd.toUtf8());
}
@@ -185,7 +185,7 @@ char* VncThread::passwdHandler(rfbClient *client)
*/
rfbBool VncThread::frameBufferHandler(rfbClient *client)
{
- VncThread *t = (VncThread*)rfbClientGetClientData(client, 0);
+ VncThread *t = reinterpret_cast<VncThread*>(rfbClientGetClientData(client, nullptr));
const int width = client->width, height = client->height, depth = 32;
const int size = width * height * (depth / 8);
qDebug("[%s] Remote desktop: %ix%ix%i", t->metaObject()->className(), width, height, depth);
@@ -201,7 +201,7 @@ rfbBool VncThread::frameBufferHandler(rfbClient *client)
::exit(1);
}
client->frameBuffer = t->_img->bits();
- memset(client->frameBuffer, '\0', (size_t)size);
+ memset(client->frameBuffer, '\0', size_t(size));
client->format.trueColour = 1;
client->format.bitsPerPixel = depth;
client->format.redShift = 16;