summaryrefslogtreecommitdiff
path: root/wx+/dc.h
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2018-09-10 02:46:25 +0000
committerB Stack <bgstack15@gmail.com>2018-09-10 02:46:25 +0000
commit728d32e6da9ce66968f8eef47a59505d613e2c1b (patch)
tree0f0441755ff0e6d65e12222d4502c648bffd6a7c /wx+/dc.h
parent10.3 (diff)
parentpull in latest 10.4 from upstream (diff)
downloadFreeFileSync-e00e9e9910726f61b7eec25c042fc7b94b08647a.tar.gz
FreeFileSync-e00e9e9910726f61b7eec25c042fc7b94b08647a.tar.bz2
FreeFileSync-e00e9e9910726f61b7eec25c042fc7b94b08647a.zip
Merge branch '10.4' into 'master'10.4
pull in latest 10.4 from upstream See merge request opensource-tracking/FreeFileSync!1
Diffstat (limited to 'wx+/dc.h')
-rwxr-xr-xwx+/dc.h11
1 files changed, 5 insertions, 6 deletions
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 <unordered_map>
-#include <zen/optional.h>
#include <zen/basic_math.h>
#include <wx/dcbuffer.h> //for macro: wxALWAYS_NATIVE_DOUBLE_BUFFER
#include <wx/dcscreen.h>
@@ -104,7 +103,7 @@ private:
//associate "active" clipping area with each DC
static std::unordered_map<wxDC*, wxRect>& refDcToAreaMap() { static std::unordered_map<wxDC*, wxRect> clippingAreas; return clippingAreas; }
- Opt<wxRect> oldRect_;
+ std::optional<wxRect> oldRect_;
wxDC& dc_;
};
@@ -114,13 +113,13 @@ private:
#endif
#if wxALWAYS_NATIVE_DOUBLE_BUFFER
-struct BufferedPaintDC : public wxPaintDC { BufferedPaintDC(wxWindow& wnd, Opt<wxBitmap>& buffer) : wxPaintDC(&wnd) {} };
+struct BufferedPaintDC : public wxPaintDC { BufferedPaintDC(wxWindow& wnd, std::optional<wxBitmap>& buffer) : wxPaintDC(&wnd) {} };
#else
class BufferedPaintDC : public wxMemoryDC
{
public:
- BufferedPaintDC(wxWindow& wnd, Opt<wxBitmap>& buffer) : buffer_(buffer), paintDc_(&wnd)
+ BufferedPaintDC(wxWindow& wnd, std::optional<wxBitmap>& 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<wxBitmap>& buffer_;
+ std::optional<wxBitmap>& buffer_;
wxPaintDC paintDc_;
};
#endif
bgstack15