From eb5d3e5df99de2c3d8da2e8bc7b12ed427465dba Mon Sep 17 00:00:00 2001 From: B Stack Date: Sun, 9 Sep 2018 18:53:23 -0400 Subject: pull in latest 10.4 from upstream --- wx+/dc.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'wx+/dc.h') diff --git a/wx+/dc.h b/wx+/dc.h index 23c70d3f..ff2f81bd 100755 --- a/wx+/dc.h +++ b/wx+/dc.h @@ -8,7 +8,6 @@ #define DC_H_4987123956832143243214 #include -#include #include #include //for macro: wxALWAYS_NATIVE_DOUBLE_BUFFER #include @@ -104,7 +103,7 @@ private: //associate "active" clipping area with each DC static std::unordered_map& refDcToAreaMap() { static std::unordered_map clippingAreas; return clippingAreas; } - Opt oldRect_; + std::optional oldRect_; wxDC& dc_; }; @@ -114,13 +113,13 @@ private: #endif #if wxALWAYS_NATIVE_DOUBLE_BUFFER -struct BufferedPaintDC : public wxPaintDC { BufferedPaintDC(wxWindow& wnd, Opt& buffer) : wxPaintDC(&wnd) {} }; +struct BufferedPaintDC : public wxPaintDC { BufferedPaintDC(wxWindow& wnd, std::optional& buffer) : wxPaintDC(&wnd) {} }; #else class BufferedPaintDC : public wxMemoryDC { public: - BufferedPaintDC(wxWindow& wnd, Opt& buffer) : buffer_(buffer), paintDc_(&wnd) + BufferedPaintDC(wxWindow& wnd, std::optional& buffer) : buffer_(buffer), paintDc_(&wnd) { const wxSize clientSize = wnd.GetClientSize(); if (clientSize.GetWidth() > 0 && clientSize.GetHeight() > 0) //wxBitmap asserts this!! width may be 0; test case "Grid::CornerWin": compare both sides, then change config @@ -134,7 +133,7 @@ public: SetLayoutDirection(wxLayout_RightToLeft); } else - buffer = NoValue(); + buffer = {}; } ~BufferedPaintDC() @@ -153,7 +152,7 @@ public: } private: - Opt& buffer_; + std::optional& buffer_; wxPaintDC paintDc_; }; #endif -- cgit