diff options
Diffstat (limited to 'plugins/HistoryStats/src/utils.h')
-rw-r--r-- | plugins/HistoryStats/src/utils.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/HistoryStats/src/utils.h b/plugins/HistoryStats/src/utils.h index cbd42f240b..db42e4c106 100644 --- a/plugins/HistoryStats/src/utils.h +++ b/plugins/HistoryStats/src/utils.h @@ -80,7 +80,17 @@ namespace utils // drawing helpers
inline POINT point(int x, int y) { POINT p = { x, y }; return p; }
- inline RECT rect(int left, int top, int right, int bottom) { RECT r = { left, top, right, bottom }; return r; }
+
+ struct rect
+ {
+ RECT r;
+ inline rect(int left, int top, int right, int bottom)
+ {
+ r = { left, top, right, bottom };
+ }
+
+ inline operator const RECT*() const { return &r; }
+ };
// misc functionality
void ensureRange(int& value, int min, int max, int fallback);
|