fixed braces formatting + dropped err_code variable

This commit is contained in:
Krzysztof Kondrak 2015-12-28 17:17:23 +01:00 committed by Krzysztof Kondrak
parent de47861fe3
commit bd5ac066a2

View file

@ -249,11 +249,8 @@ impl Window {
};
if user32::RegisterClassW(&class) == 0 {
let err_code = kernel32::GetLastError() as u32;
// ignore the "Class already exists" error for multiple windows
if err_code != 1410
{
if kernel32::GetLastError() as u32 != 1410 {
println!("Unable to register class, error {}", kernel32::GetLastError() as u32);
return None;
}