From 741300728a889b4ccaec35bd57efb072018c860c Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 10 Jan 2023 19:26:48 +0100 Subject: Use StringParameters directly We don't need to make extra copies of the string in most cases, so let's simplify the code and access the string directly when we can. --- unix/xserver/hw/vnc/vncExtInit.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'unix/xserver') diff --git a/unix/xserver/hw/vnc/vncExtInit.cc b/unix/xserver/hw/vnc/vncExtInit.cc index 8dbc048c..4c1fdd4d 100644 --- a/unix/xserver/hw/vnc/vncExtInit.cc +++ b/unix/xserver/hw/vnc/vncExtInit.cc @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -246,13 +245,12 @@ void vncExtensionInit(void) port); } - CharArray desktopNameStr(desktopName.getData()); PixelFormat pf = vncGetPixelFormat(scr); vncSetGlueContext(scr); desktop[scr] = new XserverDesktop(scr, listeners, - desktopNameStr.buf, + desktopName, pf, vncGetScreenWidth(), vncGetScreenHeight(), -- cgit v1.2.3