Fixed code style

Revert "Moved note into either warning or info #4745"

This reverts
commit d3a4ce1f11.

Revert "Changed note to notify #4745"

This reverts commit
5006adedfe.

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 commit
5696497bc0.
This commit is contained in:
Jerry (Xinyu Hou) 2015-07-08 15:46:13 -07:00
parent 41c03b8f37
commit 9483fecc42
8 changed files with 34 additions and 22 deletions

View File

@ -229,7 +229,10 @@ ArchMiscWindows::setValue(HKEY key,
const TCHAR* name, const std::string& value) const TCHAR* name, const std::string& value)
{ {
assert(key != NULL); assert(key != NULL);
if(key ==NULL) return; // TODO: throw exception if (key == NULL) {
// TODO: throw exception
return;
}
RegSetValueEx(key, name, 0, REG_SZ, RegSetValueEx(key, name, 0, REG_SZ,
reinterpret_cast<const BYTE*>(value.c_str()), reinterpret_cast<const BYTE*>(value.c_str()),
(DWORD)value.size() + 1); (DWORD)value.size() + 1);
@ -239,7 +242,10 @@ void
ArchMiscWindows::setValue(HKEY key, const TCHAR* name, DWORD value) ArchMiscWindows::setValue(HKEY key, const TCHAR* name, DWORD value)
{ {
assert(key != NULL); assert(key != NULL);
if(key ==NULL) return; // TODO: throw exception if (key == NULL) {
// TODO: throw exception
return;
}
RegSetValueEx(key, name, 0, REG_DWORD, RegSetValueEx(key, name, 0, REG_DWORD,
reinterpret_cast<CONST BYTE*>(&value), reinterpret_cast<CONST BYTE*>(&value),
sizeof(DWORD)); sizeof(DWORD));
@ -251,7 +257,10 @@ ArchMiscWindows::setValueBinary(HKEY key,
{ {
assert(key != NULL); assert(key != NULL);
assert(name != 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, RegSetValueEx(key, name, 0, REG_BINARY,
reinterpret_cast<const BYTE*>(value.data()), reinterpret_cast<const BYTE*>(value.data()),
(DWORD)value.size()); (DWORD)value.size());

View File

@ -64,13 +64,16 @@ ArchSystemWindows::getOSName() const
if (info.dwMinorVersion == 0) { if (info.dwMinorVersion == 0) {
if (info.wProductType == VER_NT_WORKSTATION) { if (info.wProductType == VER_NT_WORKSTATION) {
return "Microsoft Windows Vista"; return "Microsoft Windows Vista";
} else { }
else {
return "Microsoft Windows Server 2008"; return "Microsoft Windows Server 2008";
} }
} else if(info.dwMinorVersion == 1) { }
else if (info.dwMinorVersion == 1) {
if (info.wProductType == VER_NT_WORKSTATION) { if (info.wProductType == VER_NT_WORKSTATION) {
return "Microsoft Windows 7"; return "Microsoft Windows 7";
} else { }
else {
return "Microsoft Windows Server 2008 R2"; return "Microsoft Windows Server 2008 R2";
} }
} }