summaryrefslogtreecommitdiff
path: root/wx+/dc.h
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-05-17 17:14:47 +0000
committerB Stack <bgstack15@gmail.com>2020-05-17 17:14:47 +0000
commitcca3f71f16f85f5d506bf4bb7b3ec38fda31516a (patch)
tree1f52055b2f26fc2389d3ab4eb8d8d1e234a6316a /wx+/dc.h
parentMerge branch '10.23' into 'master' (diff)
parentadd upstream 10.24 (diff)
downloadFreeFileSync-cca3f71f16f85f5d506bf4bb7b3ec38fda31516a.tar.gz
FreeFileSync-cca3f71f16f85f5d506bf4bb7b3ec38fda31516a.tar.bz2
FreeFileSync-cca3f71f16f85f5d506bf4bb7b3ec38fda31516a.zip
Merge branch '10.24' into 'master'
add upstream 10.24 See merge request opensource-tracking/FreeFileSync!21
Diffstat (limited to 'wx+/dc.h')
-rw-r--r--wx+/dc.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/wx+/dc.h b/wx+/dc.h
index 757942ca..f1b067ac 100644
--- a/wx+/dc.h
+++ b/wx+/dc.h
@@ -73,8 +73,8 @@ class RecursiveDcClipper
public:
RecursiveDcClipper(wxDC& dc, const wxRect& r) : dc_(dc)
{
- auto it = refDcToAreaMap().find(&dc);
- if (it != refDcToAreaMap().end())
+ auto it = clippingAreas.find(&dc);
+ if (it != clippingAreas.end())
{
oldRect_ = it->second;
@@ -86,7 +86,7 @@ public:
else
{
dc_.SetClippingRegion(r);
- refDcToAreaMap().emplace(&dc_, r);
+ clippingAreas.emplace(&dc_, r);
}
}
@@ -96,15 +96,15 @@ public:
if (oldRect_)
{
dc_.SetClippingRegion(*oldRect_);
- refDcToAreaMap()[&dc_] = *oldRect_;
+ clippingAreas[&dc_] = *oldRect_;
}
else
- refDcToAreaMap().erase(&dc_);
+ clippingAreas.erase(&dc_);
}
private:
//associate "active" clipping area with each DC
- static std::unordered_map<wxDC*, wxRect>& refDcToAreaMap() { static std::unordered_map<wxDC*, wxRect> clippingAreas; return clippingAreas; }
+ inline static std::unordered_map<wxDC*, wxRect> clippingAreas;
std::optional<wxRect> oldRect_;
wxDC& dc_;
bgstack15