summaryrefslogtreecommitdiff
path: root/src/screen.h
diff options
context:
space:
mode:
authorAndrzej Rybczak <electricityispower@gmail.com>2015-05-17 22:04:50 +0200
committerAndrzej Rybczak <electricityispower@gmail.com>2015-05-17 22:04:50 +0200
commitc7fe74dd6670c61c0607552269fdb1ba0970f048 (patch)
treea371f77f3096c1b0c77a3ed7de28989e9a58aa9f /src/screen.h
parent2caf08aaa783cfabf54212bcb0197afc1db24440 (diff)
screen: provide const main() overload
Diffstat (limited to 'src/screen.h')
-rw-r--r--src/screen.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/screen.h b/src/screen.h
index 67ba2b31..2ec9d28e 100644
--- a/src/screen.h
+++ b/src/screen.h
@@ -120,7 +120,9 @@ bool isVisible(BaseScreen *screen);
template <typename WindowT> struct Screen : public BaseScreen
{
typedef WindowT WindowType;
- typedef typename std::add_lvalue_reference<WindowType>::type WindowReference;
+ typedef typename std::add_lvalue_reference<
+ WindowType
+ >::type WindowReference;
typedef typename std::add_lvalue_reference<
typename std::add_const<WindowType>::type
>::type ConstWindowReference;
@@ -201,6 +203,9 @@ public:
WindowReference main() {
return w;
}
+ ConstWindowReference main() const {
+ return w;
+ }
protected:
/// Template parameter that should indicate the main type