From 8582bee07a6b398f739879e3020dfabe446c7845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 3 Nov 2013 19:59:41 +0100 Subject: [PATCH] Platform: ability to access particular Application subclass from Screen. This isn't exactly encouraging good practices, but I didn't come up with better solution yet. --- src/Platform/Screen.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Platform/Screen.h b/src/Platform/Screen.h index bbdd5fc86..805fbd2f2 100644 --- a/src/Platform/Screen.h +++ b/src/Platform/Screen.h @@ -134,12 +134,12 @@ template class BasicScreen: private Containers::LinkedListIte void setPropagatedEvents(PropagatedEvents events) { _propagatedEvents = events; } /** @brief %Application holding this screen */ - BasicScreenedApplication* application() { - return Containers::LinkedListItem, BasicScreenedApplication>::list(); + template> T* application() { + return static_cast(Containers::LinkedListItem, BasicScreenedApplication>::list()); } /** @overload */ - const BasicScreenedApplication* application() const { - return Containers::LinkedListItem, BasicScreenedApplication>::list(); + template> const T* application() const { + return static_cast(Containers::LinkedListItem, BasicScreenedApplication>::list()); } /**