Fix: VkMapping declarations violated C++ ODR rule.

This commit is contained in:
milek7
2021-02-14 14:06:19 +01:00
committed by Loïc Guilloux
parent 5a1fa18509
commit 751f595bb6
6 changed files with 16 additions and 16 deletions

View File

@@ -673,7 +673,7 @@ void CocoaDialog(const char *title, const char *message, const char *buttonLabel
BOOL interpret_keys = YES;
if (down) {
/* Map keycode to OTTD code. */
auto vk = std::find_if(std::begin(_vk_mapping), std::end(_vk_mapping), [=](const VkMapping &m) { return m.vk_from == keycode; });
auto vk = std::find_if(std::begin(_vk_mapping), std::end(_vk_mapping), [=](const CocoaVkMapping &m) { return m.vk_from == keycode; });
uint32 pressed_key = vk != std::end(_vk_mapping) ? vk->map_to : 0;
if (modifiers & NSShiftKeyMask) pressed_key |= WKC_SHIFT;