Fix wrong indentation in wxDDE code

No real changes, but this avoids warnings about possibly wrong code from the
latest g++ versions.

Also add braces around a multiline "if" statement body.
This commit is contained in:
Vadim Zeitlin 2016-09-15 19:42:32 +02:00
parent b99d28bb46
commit cc710218e6

View File

@ -884,18 +884,20 @@ _DDECallback(WORD wType,
(wxIPCFormat)wFmt);
if (data)
{
if (user_size == wxNO_LEN)
switch (wFmt)
if (user_size == wxNO_LEN)
{
case wxIPC_TEXT:
case wxIPC_UTF8TEXT:
user_size = strlen((const char*)data) + 1; // includes final NUL
break;
case wxIPC_UNICODETEXT:
user_size = (wcslen((const wchar_t*)data) + 1) * sizeof(wchar_t); // includes final NUL
break;
default:
user_size = 0;
switch (wFmt)
{
case wxIPC_TEXT:
case wxIPC_UTF8TEXT:
user_size = strlen((const char*)data) + 1; // includes final NUL
break;
case wxIPC_UNICODETEXT:
user_size = (wcslen((const wchar_t*)data) + 1) * sizeof(wchar_t); // includes final NUL
break;
default:
user_size = 0;
}
}
HDDEDATA handle = DdeCreateDataHandle(DDEIdInst,