Always initialize SelectInHDC::m_hgdiobj in wxMSW.

Leaving m_hgdiobj uninitialized probably didn't result in any problems
considering how this class is currently used but it did result in g++ warnings
about uninitialized member with aggressive warning flags and also could easily
become a problem in the future so just ensure that we always initialize it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-06-29 17:50:30 +00:00
parent 917b008579
commit b02d50281d

View File

@@ -454,7 +454,7 @@ private:
void DoInit(HGDIOBJ hgdiobj) { m_hgdiobj = ::SelectObject(m_hdc, hgdiobj); }
public:
SelectInHDC() : m_hdc(NULL) { }
SelectInHDC() : m_hdc(NULL), m_hgdiobj(NULL) { }
SelectInHDC(HDC hdc, HGDIOBJ hgdiobj) : m_hdc(hdc) { DoInit(hgdiobj); }
void Init(HDC hdc, HGDIOBJ hgdiobj)