Fixed code style
Revert "Moved note into either warning or info #4745" This reverts commitd3a4ce1f11
. Revert "Changed note to notify #4745" This reverts commit5006adedfe
. Conflicts: src/test/unittests/ipc/IpcLogOutputterTests.cpp Shortened transmission log #4858 Revert "Added code to throw an error if the plugin can't be deleted or written to #4696" This reverts commit5696497bc0
.
This commit is contained in:
parent
41c03b8f37
commit
9483fecc42
|
@ -228,8 +228,11 @@ void
|
|||
ArchMiscWindows::setValue(HKEY key,
|
||||
const TCHAR* name, const std::string& value)
|
||||
{
|
||||
assert(key != NULL);
|
||||
if(key ==NULL) return; // TODO: throw exception
|
||||
assert(key != NULL);
|
||||
if (key == NULL) {
|
||||
// TODO: throw exception
|
||||
return;
|
||||
}
|
||||
RegSetValueEx(key, name, 0, REG_SZ,
|
||||
reinterpret_cast<const BYTE*>(value.c_str()),
|
||||
(DWORD)value.size() + 1);
|
||||
|
@ -238,8 +241,11 @@ ArchMiscWindows::setValue(HKEY key,
|
|||
void
|
||||
ArchMiscWindows::setValue(HKEY key, const TCHAR* name, DWORD value)
|
||||
{
|
||||
assert(key != NULL);
|
||||
if(key ==NULL) return; // TODO: throw exception
|
||||
assert(key != NULL);
|
||||
if (key == NULL) {
|
||||
// TODO: throw exception
|
||||
return;
|
||||
}
|
||||
RegSetValueEx(key, name, 0, REG_DWORD,
|
||||
reinterpret_cast<CONST BYTE*>(&value),
|
||||
sizeof(DWORD));
|
||||
|
@ -251,7 +257,10 @@ ArchMiscWindows::setValueBinary(HKEY key,
|
|||
{
|
||||
assert(key != NULL);
|
||||
assert(name != NULL);
|
||||
if(key ==NULL || name==NULL) return; // TODO: throw exception
|
||||
if (key == NULL || name == NULL) {
|
||||
// TODO: throw exception
|
||||
return;
|
||||
}
|
||||
RegSetValueEx(key, name, 0, REG_BINARY,
|
||||
reinterpret_cast<const BYTE*>(value.data()),
|
||||
(DWORD)value.size());
|
||||
|
|
|
@ -61,16 +61,19 @@ ArchSystemWindows::getOSName() const
|
|||
case VER_PLATFORM_WIN32_NT:
|
||||
#if WINVER >= _WIN32_WINNT_WIN2K
|
||||
if (info.dwMajorVersion == 6) {
|
||||
if(info.dwMinorVersion == 0) {
|
||||
if (info.dwMinorVersion == 0) {
|
||||
if (info.wProductType == VER_NT_WORKSTATION) {
|
||||
return "Microsoft Windows Vista";
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return "Microsoft Windows Server 2008";
|
||||
}
|
||||
} else if(info.dwMinorVersion == 1) {
|
||||
}
|
||||
else if (info.dwMinorVersion == 1) {
|
||||
if (info.wProductType == VER_NT_WORKSTATION) {
|
||||
return "Microsoft Windows 7";
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return "Microsoft Windows Server 2008 R2";
|
||||
}
|
||||
}
|
||||
|
@ -102,7 +105,7 @@ std::string
|
|||
ArchSystemWindows::getPlatformName() const
|
||||
{
|
||||
#ifdef _X86_
|
||||
if(isWOW64())
|
||||
if (isWOW64())
|
||||
return "x86 (WOW64)";
|
||||
else
|
||||
return "x86";
|
||||
|
@ -146,7 +149,7 @@ ArchSystemWindows::isWOW64() const
|
|||
(LPFN_ISWOW64PROCESS) GetProcAddress(hModule, "IsWow64Process");
|
||||
|
||||
BOOL bIsWow64 = FALSE;
|
||||
if(NULL != fnIsWow64Process &&
|
||||
if (NULL != fnIsWow64Process &&
|
||||
fnIsWow64Process(GetCurrentProcess(), &bIsWow64) &&
|
||||
bIsWow64)
|
||||
{
|
||||
|
|
|
@ -566,7 +566,7 @@ EventQueue::waitForReady() const
|
|||
Lock lock(m_readyMutex);
|
||||
|
||||
while (!m_readyCondVar->wait()) {
|
||||
if(ARCH->time() > timeout) {
|
||||
if (ARCH->time() > timeout) {
|
||||
throw std::runtime_error("event queue is not ready within 5 sec");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -116,8 +116,8 @@ getDropData(IDataObject* dataObject)
|
|||
STGMEDIUM stgMed;
|
||||
|
||||
// See if the dataobject contains any DROP stored as a HGLOBAL
|
||||
if(dataObject->QueryGetData(&fmtEtc) == S_OK) {
|
||||
if(dataObject->GetData(&fmtEtc, &stgMed) == S_OK) {
|
||||
if (dataObject->QueryGetData(&fmtEtc) == S_OK) {
|
||||
if (dataObject->GetData(&fmtEtc, &stgMed) == S_OK) {
|
||||
// get data here
|
||||
PVOID data = GlobalLock(stgMed.hGlobal);
|
||||
|
||||
|
|
|
@ -310,7 +310,7 @@ MSWindowsScreen::enter()
|
|||
// and that the screen is not in powersave mode.
|
||||
ArchMiscWindows::wakeupDisplay();
|
||||
|
||||
if(m_screensaver != NULL && m_screensaverActive)
|
||||
if (m_screensaver != NULL && m_screensaverActive)
|
||||
{
|
||||
m_screensaver->deactivate();
|
||||
m_screensaverActive = 0;
|
||||
|
@ -923,7 +923,7 @@ void
|
|||
MSWindowsScreen::sendClipboardEvent(Event::Type type, ClipboardID id)
|
||||
{
|
||||
ClipboardInfo* info = (ClipboardInfo*)malloc(sizeof(ClipboardInfo));
|
||||
if(info == NULL) {
|
||||
if (info == NULL) {
|
||||
LOG((CLOG_ERR "malloc failed on %s:%s", __FILE__, __LINE__ ));
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ invoke(const char* command, void** args)
|
|||
g_secureListenSocket = NULL;
|
||||
}
|
||||
}
|
||||
else if(strcmp(command, "version") == 0) {
|
||||
else if (strcmp(command, "version") == 0) {
|
||||
return (void*) kSynergyVers;
|
||||
}
|
||||
|
||||
|
|
|
@ -151,8 +151,8 @@ ClientListener::handleClientConnecting(const Event&, void*)
|
|||
|
||||
if (m_useSecureNetwork) {
|
||||
LOG((CLOG_DEBUG2 "attempting sercure Connection"));
|
||||
while(!socket->isReady()) {
|
||||
if(socket->isFatal()) {
|
||||
while (!socket->isReady()) {
|
||||
if (socket->isFatal()) {
|
||||
m_listen->deleteSocket(socket);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -334,7 +334,7 @@ doKeyboardHookHandler(WPARAM wParam, LPARAM lParam)
|
|||
// map the key event to a character. we have to put the dead
|
||||
// key back first and this has the side effect of removing it.
|
||||
if (g_deadVirtKey != 0) {
|
||||
if(ToAscii((UINT)g_deadVirtKey, (g_deadLParam & 0x10ff0000u) >> 16,
|
||||
if (ToAscii((UINT)g_deadVirtKey, (g_deadLParam & 0x10ff0000u) >> 16,
|
||||
g_deadKeyState, &c, flags) == 2)
|
||||
{
|
||||
// If ToAscii returned 2, it means that we accidentally removed
|
||||
|
@ -366,7 +366,7 @@ doKeyboardHookHandler(WPARAM wParam, LPARAM lParam)
|
|||
PostThreadMessage(g_threadID, SYNERGY_MSG_DEBUG,
|
||||
wParam | 0x05000000, lParam);
|
||||
if (g_deadVirtKey != 0) {
|
||||
if(ToAscii((UINT)g_deadVirtKey, (g_deadLParam & 0x10ff0000u) >> 16,
|
||||
if (ToAscii((UINT)g_deadVirtKey, (g_deadLParam & 0x10ff0000u) >> 16,
|
||||
g_deadKeyState, &c, flags) == 2)
|
||||
{
|
||||
ToAscii((UINT)g_deadVirtKey, (g_deadLParam & 0x10ff0000u) >> 16,
|
||||
|
@ -397,7 +397,7 @@ doKeyboardHookHandler(WPARAM wParam, LPARAM lParam)
|
|||
default:
|
||||
// key is a dead key
|
||||
|
||||
if(lParam & 0x80000000u)
|
||||
if (lParam & 0x80000000u)
|
||||
// This handles the obscure situation where a key has been
|
||||
// pressed which is both a dead key and a normal character
|
||||
// depending on which modifiers have been pressed. We
|
||||
|
|
Loading…
Reference in New Issue