diff --git a/src/network/network_command.cpp b/src/network/network_command.cpp index 09015783ea..01e43e4ece 100644 --- a/src/network/network_command.cpp +++ b/src/network/network_command.cpp @@ -114,7 +114,7 @@ static auto _callback_table = MakeCallbackTable(std::make_index_sequence<_callba template struct CallbackArgsHelper; template -struct CallbackArgsHelper { +struct CallbackArgsHelper { using Args = std::tuple...>; }; diff --git a/src/os/macosx/font_osx.cpp b/src/os/macosx/font_osx.cpp index 6588eb7507..e2a96d302f 100644 --- a/src/os/macosx/font_osx.cpp +++ b/src/os/macosx/font_osx.cpp @@ -46,13 +46,13 @@ bool SetFallbackFont(FontCacheSettings *settings, const std::string &language_is lang_codes[0] = CFStringCreateWithCString(kCFAllocatorDefault, lang.c_str(), kCFStringEncodingUTF8); lang_codes[1] = CFSTR("en"); CFArrayRef lang_arr = CFArrayCreate(kCFAllocatorDefault, (const void **)lang_codes, lengthof(lang_codes), &kCFTypeArrayCallBacks); - CFAutoRelease lang_attribs(CFDictionaryCreate(kCFAllocatorDefault, const_cast(reinterpret_cast(&kCTFontLanguagesAttribute)), (const void **)&lang_arr, 1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); + CFAutoRelease lang_attribs(CFDictionaryCreate(kCFAllocatorDefault, const_cast(reinterpret_cast(&kCTFontLanguagesAttribute)), (const void **)&lang_arr, 1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); CFAutoRelease lang_desc(CTFontDescriptorCreateWithAttributes(lang_attribs.get())); CFRelease(lang_arr); CFRelease(lang_codes[0]); /* Get array of all font descriptors for the wanted language. */ - CFAutoRelease mandatory_attribs(CFSetCreate(kCFAllocatorDefault, const_cast(reinterpret_cast(&kCTFontLanguagesAttribute)), 1, &kCFTypeSetCallBacks)); + CFAutoRelease mandatory_attribs(CFSetCreate(kCFAllocatorDefault, const_cast(reinterpret_cast(&kCTFontLanguagesAttribute)), 1, &kCFTypeSetCallBacks)); CFAutoRelease descs(CTFontDescriptorCreateMatchingFontDescriptors(lang_desc.get(), mandatory_attribs.get())); bool result = false; diff --git a/src/story.cpp b/src/story.cpp index 89a2474811..3919a140ae 100644 --- a/src/story.cpp +++ b/src/story.cpp @@ -438,10 +438,10 @@ CommandCost CmdRemoveStoryPageElement(DoCommandFlags flags, StoryPageElementID p CommandCost CmdStoryPageButton(DoCommandFlags flags, TileIndex tile, StoryPageElementID page_element_id, VehicleID reference) { if (!StoryPageElement::IsValidID(page_element_id)) return CMD_ERROR; - const StoryPageElement *const pe = StoryPageElement::Get(page_element_id); + const StoryPageElement * const pe = StoryPageElement::Get(page_element_id); /* Check the player belongs to the company that owns the page. */ - const StoryPage *const sp = StoryPage::Get(pe->page); + const StoryPage * const sp = StoryPage::Get(pe->page); if (sp->company != CompanyID::Invalid() && sp->company != _current_company) return CMD_ERROR; switch (pe->type) { diff --git a/src/story_gui.cpp b/src/story_gui.cpp index 54707cc653..b53954e7eb 100644 --- a/src/story_gui.cpp +++ b/src/story_gui.cpp @@ -890,7 +890,7 @@ public: void OnPlaceObject([[maybe_unused]] Point pt, TileIndex tile) override { - const StoryPageElement *const pe = StoryPageElement::GetIfValid(this->active_button_id); + const StoryPageElement * const pe = StoryPageElement::GetIfValid(this->active_button_id); if (pe == nullptr || pe->type != SPET_BUTTON_TILE) { ResetObjectToPlace(); this->active_button_id = StoryPageElementID::Invalid(); @@ -904,7 +904,7 @@ public: bool OnVehicleSelect(const Vehicle *v) override { - const StoryPageElement *const pe = StoryPageElement::GetIfValid(this->active_button_id); + const StoryPageElement * const pe = StoryPageElement::GetIfValid(this->active_button_id); if (pe == nullptr || pe->type != SPET_BUTTON_VEHICLE) { ResetObjectToPlace(); this->active_button_id = StoryPageElementID::Invalid();