From 82de5083aa9f0c5711fe9e104cc2c3e146e43fdf Mon Sep 17 00:00:00 2001
From: Louis Moureaux <m_louis30@yahoo.com>
Date: Mon, 11 Jul 2022 01:25:22 +0200
Subject: [PATCH] Fix build with Apple clang

Strangely enough, other versions of clang work fine...

See #1117.
---
 client/shortcuts.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/client/shortcuts.cpp b/client/shortcuts.cpp
index 1eaf4afe48..941bdff0ea 100644
--- a/client/shortcuts.cpp
+++ b/client/shortcuts.cpp
@@ -264,7 +264,10 @@ void fc_shortcuts::create_no_action_shortcuts(map_view *parent)
   }
 
   // Create new ones
-  for (const auto &[id, shortcut] : shortcuts()) {
+  for (const auto &pair : shortcuts()) {
+    // No structued bindings because of clang, see #1117
+    auto id = pair.first;
+    auto shortcut = pair.second;
     if (shortcut.type == fc_shortcut::keyboard) {
       if (m_actions.count(id) == 0 || m_actions[id] == nullptr) {
         auto qs = new QShortcut(shortcut.keys, parent);