Make winvnc4 and Windows vncconfig compilable via MinGW.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3913 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/win/winvnc/STrayIcon.cxx b/win/winvnc/STrayIcon.cxx
index 0b10fa5..354575a 100644
--- a/win/winvnc/STrayIcon.cxx
+++ b/win/winvnc/STrayIcon.cxx
@@ -59,8 +59,9 @@
const UINT WM_SET_TOOLTIP = WM_USER + 1;
+namespace winvnc {
-class winvnc::STrayIcon : public TrayIcon {
+class STrayIcon : public TrayIcon {
public:
STrayIcon(STrayIconThread& t) : thread(t),
vncConfig(_T("vncconfig.exe"), isServiceProcess() ? _T("-noconsole -service") : _T("-noconsole")),
@@ -183,7 +184,7 @@
switch (command->dwData) {
case 1:
{
- CharArray viewer = new char[command->cbData + 1];
+ CharArray viewer(command->cbData + 1);
memcpy(viewer.buf, command->lpData, command->cbData);
viewer.buf[command->cbData] = 0;
return thread.server.addNewClient(viewer.buf) ? 1 : 0;
@@ -277,4 +278,5 @@
PostMessage(windowHandle, WM_SET_TOOLTIP, 0, 0);
}
+}