From 2b70480b9740c36c50b69d87954c645217cd65cf Mon Sep 17 00:00:00 2001 From: Mathias Gumz Date: Wed, 21 Jan 2015 09:53:54 +0100 Subject: Fix compile errors with clang --- src/ConfigMenu.hh | 4 +++- src/Screen.cc | 6 +----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/ConfigMenu.hh b/src/ConfigMenu.hh index b778f0f..5cb67f4 100644 --- a/src/ConfigMenu.hh +++ b/src/ConfigMenu.hh @@ -24,7 +24,7 @@ class BScreen; -class ScreenResource; +struct ScreenResource; namespace FbTk{ class Menu; @@ -36,6 +36,8 @@ public: // makes the setup() function-signature shorter struct SetupHelper { + SetupHelper(BScreen& _s, FbTk::ResourceManager& _rm, ScreenResource& _r) : + screen(_s), rm(_rm), resource(_r) { } BScreen& screen; FbTk::ResourceManager& rm; ScreenResource& resource; diff --git a/src/Screen.cc b/src/Screen.cc index 666bb3e..1edcd93 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -1408,11 +1408,7 @@ float BScreen::getYGap(int head) { void BScreen::setupConfigmenu(FbTk::Menu &menu) { - struct ConfigMenu::SetupHelper sh; - sh.screen = *this; - sh.rm = m_resource_manager; - sh.resource = resource; - + struct ConfigMenu::SetupHelper sh(*this, m_resource_manager, resource); menu.removeAll(); ConfigMenu::setup(menu, sh); menu.updateMenu(); -- cgit v0.11.2