mirror of https://github.com/OpenTTD/OpenTTD
Codechange: [Win32] Use return-early in RegisterWndClass()
parent
7415964a4d
commit
689404a4a1
|
@ -975,7 +975,8 @@ static void RegisterWndClass()
|
||||||
{
|
{
|
||||||
static bool registered = false;
|
static bool registered = false;
|
||||||
|
|
||||||
if (!registered) {
|
if (registered) return;
|
||||||
|
|
||||||
HINSTANCE hinst = GetModuleHandle(nullptr);
|
HINSTANCE hinst = GetModuleHandle(nullptr);
|
||||||
WNDCLASS wnd = {
|
WNDCLASS wnd = {
|
||||||
CS_OWNDC,
|
CS_OWNDC,
|
||||||
|
@ -993,7 +994,6 @@ static void RegisterWndClass()
|
||||||
registered = true;
|
registered = true;
|
||||||
if (!RegisterClass(&wnd)) usererror("RegisterClass failed");
|
if (!RegisterClass(&wnd)) usererror("RegisterClass failed");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
static bool AllocateDibSection(int w, int h, bool force)
|
static bool AllocateDibSection(int w, int h, bool force)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue