From 4cd5b43c869f126cf67a6879d0eb8d9108b8ada5 Mon Sep 17 00:00:00 2001 From: Pyry Haulos Date: Tue, 3 Feb 2015 11:26:43 -0800 Subject: [PATCH] Win32Window cleanup * Use TCU_THROW instead of manually passing in __FILE__ and __LINE__. * Use more descriptive window title. Change-Id: Ide66250640f0b4d6b8e1b6d9768f19e753e6783a --- framework/platform/win32/tcuWin32Window.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/framework/platform/win32/tcuWin32Window.cpp b/framework/platform/win32/tcuWin32Window.cpp index e691694..4e674e8 100644 --- a/framework/platform/win32/tcuWin32Window.cpp +++ b/framework/platform/win32/tcuWin32Window.cpp @@ -40,8 +40,8 @@ Win32Window::Win32Window (HINSTANCE instance, int width, int height) { try { - static const char s_className[] = "dEQP Tester Core Class"; - static const char s_windowName[] = "dEQP Tester Core"; + static const char s_className[] = "dEQP Test Process Class"; + static const char s_windowName[] = "dEQP Test Process"; { WNDCLASS wndClass; @@ -67,7 +67,7 @@ Win32Window::Win32Window (HINSTANCE instance, int width, int height) NULL, NULL, instance, NULL); if (!m_window) - throw ResourceError("Failed to create Win32 window", "", __FILE__, __LINE__); + TCU_THROW(ResourceError, "Failed to create Win32 window"); // Store this as userdata SetWindowLongPtr(m_window, GWLP_USERDATA, (LONG_PTR)this); @@ -109,19 +109,19 @@ void Win32Window::setSize (int width, int height) rc.bottom = height; if (!AdjustWindowRect(&rc, GetWindowLong(m_window, GWL_STYLE), GetMenu(m_window) != NULL)) - throw tcu::TestError("AdjustWindowRect() failed", DE_NULL, __FILE__, __LINE__); + TCU_THROW(TestError, "AdjustWindowRect() failed"); if (!SetWindowPos(m_window, NULL, 0, 0, rc.right - rc.left, rc.bottom - rc.top, SWP_NOACTIVATE | SWP_NOCOPYBITS | SWP_NOMOVE | SWP_NOZORDER)) - throw tcu::TestError("SetWindowPos() failed", DE_NULL, __FILE__, __LINE__); + TCU_THROW(TestError, "SetWindowPos() failed"); } IVec2 Win32Window::getSize (void) const { RECT rc; if (!GetClientRect(m_window, &rc)) - throw tcu::TestError("GetClientRect() failed", DE_NULL, __FILE__, __LINE__); + TCU_THROW(TestError, "GetClientRect() failed"); return IVec2(rc.right - rc.left, rc.bottom - rc.top); -- 2.7.4