Bug 1329362 - part 4, Remove unused Windows class AutoDestroyHWND from GLContextProviderEGL r=kats

This commit is contained in:
Randall Barker 2017-01-20 15:41:48 -08:00
parent 90668218b7
commit c18622c8f4

View File

@ -39,41 +39,6 @@
#endif
#include <windows.h>
// a little helper
class AutoDestroyHWND {
public:
explicit AutoDestroyHWND(HWND aWnd = nullptr)
: mWnd(aWnd)
{
}
~AutoDestroyHWND() {
if (mWnd) {
::DestroyWindow(mWnd);
}
}
operator HWND() {
return mWnd;
}
HWND forget() {
HWND w = mWnd;
mWnd = nullptr;
return w;
}
HWND operator=(HWND aWnd) {
if (mWnd && mWnd != aWnd) {
::DestroyWindow(mWnd);
}
mWnd = aWnd;
return mWnd;
}
HWND mWnd;
};
#else
#error "Platform not recognized"
#endif