Changeset - r27942:f7389062d120
[Not reviewed]
master
! ! !
frosch - 8 months ago 2023-09-16 20:20:53
frosch@openttd.org
Codechange: Silence warnings about intentionally unused parameters.
156 files changed:
Changeset was too big and was cut off... Show full diff anyway
0 comments (0 inline, 0 general)
src/3rdparty/squirrel/squirrel/sqbaselib.cpp
Show inline comments
 
@@ -559,7 +559,7 @@ bool _hsort_sift_down(HSQUIRRELVM v,SQAr
 
	return true;
 
}
 

	
 
bool _hsort(HSQUIRRELVM v,SQObjectPtr &arr, SQInteger l, SQInteger r,SQInteger func)
 
bool _hsort(HSQUIRRELVM v,SQObjectPtr &arr, SQInteger, SQInteger,SQInteger func)
 
{
 
	SQArray *a = _array(arr);
 
	SQInteger i;
src/3rdparty/squirrel/squirrel/sqclass.cpp
Show inline comments
 
@@ -187,7 +187,7 @@ SQInstance::~SQInstance()
 
	if(_class){ Finalize(); } //if _class is null it was already finalized by the GC
 
}
 

	
 
bool SQInstance::GetMetaMethod(SQVM *v,SQMetaMethod mm,SQObjectPtr &res)
 
bool SQInstance::GetMetaMethod(SQVM *,SQMetaMethod mm,SQObjectPtr &res)
 
{
 
	if(type(_class->_metamethods[mm]) != OT_NULL) {
 
		res = _class->_metamethods[mm];
src/3rdparty/squirrel/squirrel/sqobject.h
Show inline comments
 
@@ -76,7 +76,7 @@ struct SQRefCounted
 
	}
 

	
 
	/* Never used but required. */
 
	inline void operator delete(void *ptr) { NOT_REACHED(); }
 
	inline void operator delete(void *) { NOT_REACHED(); }
 

	
 
private:
 
	size_t size;
src/3rdparty/squirrel/squirrel/sqstate.cpp
Show inline comments
 
@@ -274,7 +274,7 @@ void SQSharedState::EnqueueMarkObject(SQ
 
}
 

	
 

	
 
SQInteger SQSharedState::CollectGarbage(SQVM *vm)
 
SQInteger SQSharedState::CollectGarbage(SQVM *)
 
{
 
	SQInteger n=0;
 
	SQVM *vms = _thread(_root_vm);
src/ai/ai_gui.cpp
Show inline comments
 
@@ -119,7 +119,7 @@ struct AIConfigWindow : public Window {
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_AIC_DECREASE_NUMBER:
 
@@ -181,7 +181,7 @@ struct AIConfigWindow : public Window {
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		if (widget >= WID_AIC_TEXTFILE && widget < WID_AIC_TEXTFILE + TFT_CONTENT_END) {
 
			if (this->selected_slot == INVALID_COMPANY || AIConfig::GetConfig(this->selected_slot) == nullptr) return;
 
@@ -267,7 +267,7 @@ struct AIConfigWindow : public Window {
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!IsEditable(this->selected_slot)) {
 
			this->selected_slot = INVALID_COMPANY;
src/aircraft_cmd.cpp
Show inline comments
 
@@ -1282,7 +1282,7 @@ void HandleMissingAircraftOrders(Aircraf
 
}
 

	
 

	
 
TileIndex Aircraft::GetOrderStationLocation(StationID station)
 
TileIndex Aircraft::GetOrderStationLocation(StationID)
 
{
 
	/* Orders are changed in flight, ensure going to the right station. */
 
	if (this->state == FLYING) {
 
@@ -1599,31 +1599,31 @@ static void AircraftEventHandler_AtTermi
 
	AirportMove(v, apc);
 
}
 

	
 
static void AircraftEventHandler_General(Aircraft *v, const AirportFTAClass *apc)
 
static void AircraftEventHandler_General(Aircraft *, const AirportFTAClass *)
 
{
 
	FatalError("OK, you shouldn't be here, check your Airport Scheme!");
 
}
 

	
 
static void AircraftEventHandler_TakeOff(Aircraft *v, const AirportFTAClass *apc)
 
static void AircraftEventHandler_TakeOff(Aircraft *v, const AirportFTAClass *)
 
{
 
	PlayAircraftSound(v); // play takeoffsound for airplanes
 
	v->state = STARTTAKEOFF;
 
}
 

	
 
static void AircraftEventHandler_StartTakeOff(Aircraft *v, const AirportFTAClass *apc)
 
static void AircraftEventHandler_StartTakeOff(Aircraft *v, const AirportFTAClass *)
 
{
 
	v->state = ENDTAKEOFF;
 
	v->UpdateDeltaXY();
 
}
 

	
 
static void AircraftEventHandler_EndTakeOff(Aircraft *v, const AirportFTAClass *apc)
 
static void AircraftEventHandler_EndTakeOff(Aircraft *v, const AirportFTAClass *)
 
{
 
	v->state = FLYING;
 
	/* get the next position to go to, differs per airport */
 
	AircraftNextAirportPos_and_Order(v);
 
}
 

	
 
static void AircraftEventHandler_HeliTakeOff(Aircraft *v, const AirportFTAClass *apc)
 
static void AircraftEventHandler_HeliTakeOff(Aircraft *v, const AirportFTAClass *)
 
{
 
	v->state = FLYING;
 
	v->UpdateDeltaXY();
 
@@ -1677,7 +1677,7 @@ static void AircraftEventHandler_Flying(
 
	v->pos = apc->layout[v->pos].next_position;
 
}
 

	
 
static void AircraftEventHandler_Landing(Aircraft *v, const AirportFTAClass *apc)
 
static void AircraftEventHandler_Landing(Aircraft *v, const AirportFTAClass *)
 
{
 
	v->state = ENDLANDING;
 
	AircraftLandAirplane(v);  // maybe crash airplane
 
@@ -1690,7 +1690,7 @@ static void AircraftEventHandler_Landing
 
	}
 
}
 

	
 
static void AircraftEventHandler_HeliLanding(Aircraft *v, const AirportFTAClass *apc)
 
static void AircraftEventHandler_HeliLanding(Aircraft *v, const AirportFTAClass *)
 
{
 
	v->state = HELIENDLANDING;
 
	v->UpdateDeltaXY();
src/airport_gui.cpp
Show inline comments
 
@@ -47,7 +47,7 @@ static void ShowBuildAirportPicker(Windo
 

	
 
SpriteID GetCustomAirportSprite(const AirportSpec *as, byte layout);
 

	
 
void CcBuildAirport(Commands cmd, const CommandCost &result, TileIndex tile)
 
void CcBuildAirport(Commands, const CommandCost &result, TileIndex tile)
 
{
 
	if (result.Failed()) return;
 

	
 
@@ -102,7 +102,7 @@ struct BuildAirToolbarWindow : Window {
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 

	
 
@@ -118,7 +118,7 @@ struct BuildAirToolbarWindow : Window {
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_AT_AIRPORT:
 
@@ -138,7 +138,7 @@ struct BuildAirToolbarWindow : Window {
 
	}
 

	
 

	
 
	void OnPlaceObject(Point pt, TileIndex tile) override
 
	void OnPlaceObject([[maybe_unused]] Point pt, TileIndex tile) override
 
	{
 
		switch (this->last_user_action) {
 
			case WID_AT_AIRPORT:
 
@@ -153,12 +153,12 @@ struct BuildAirToolbarWindow : Window {
 
		}
 
	}
 

	
 
	void OnPlaceDrag(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt) override
 
	void OnPlaceDrag(ViewportPlaceMethod select_method, [[maybe_unused]] ViewportDragDropSelectionProcess select_proc, [[maybe_unused]] Point pt) override
 
	{
 
		VpSelectTilesWithMethod(pt.x, pt.y, select_method);
 
	}
 

	
 
	void OnPlaceMouseUp(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile) override
 
	void OnPlaceMouseUp([[maybe_unused]] ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, [[maybe_unused]] Point pt, TileIndex start_tile, TileIndex end_tile) override
 
	{
 
		if (pt.x != -1 && select_proc == DDSP_DEMOLISH_AREA) {
 
			GUIPlaceProcDragXY(select_proc, start_tile, end_tile);
 
@@ -316,7 +316,7 @@ public:
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_AP_CLASS_DROPDOWN: {
 
@@ -487,7 +487,7 @@ public:
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_AP_CLASS_DROPDOWN:
 
@@ -569,7 +569,7 @@ public:
 
		this->SelectFirstAvailableAirport(false);
 
	}
 

	
 
	void OnRealtimeTick(uint delta_ms) override
 
	void OnRealtimeTick([[maybe_unused]] uint delta_ms) override
 
	{
 
		CheckRedrawStationCoverage(this);
 
	}
src/autoreplace_gui.cpp
Show inline comments
 
@@ -300,7 +300,7 @@ public:
 
		this->sel_group = id_g;
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_RV_SORT_ASCENDING_DESCENDING: {
 
@@ -539,7 +539,7 @@ public:
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_RV_SORT_ASCENDING_DESCENDING:
 
@@ -712,7 +712,7 @@ public:
 
		}
 
	}
 

	
 
	bool OnTooltip(Point pt, int widget, TooltipCloseCondition close_cond) override
 
	bool OnTooltip([[maybe_unused]] Point pt, int widget, TooltipCloseCondition close_cond) override
 
	{
 
		if (widget != WID_RV_TRAIN_WAGONREMOVE_TOGGLE) return false;
 

	
 
@@ -736,7 +736,7 @@ public:
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (data != 0) {
 
			/* This needs to be done in command-scope to enforce rebuilding before resorting invalid data */
src/base_media_func.h
Show inline comments
 
@@ -153,7 +153,7 @@ bool BaseSet<T, Tnum_files, Tsearch_in_t
 
}
 

	
 
template <class Tbase_set>
 
bool BaseMedia<Tbase_set>::AddFile(const std::string &filename, size_t basepath_length, const std::string &tar_filename)
 
bool BaseMedia<Tbase_set>::AddFile(const std::string &filename, size_t basepath_length, const std::string &)
 
{
 
	bool ret = false;
 
	Debug(grf, 1, "Checking {} for base " SET_TYPE " set", filename);
src/blitter/32bpp_base.cpp
Show inline comments
 
@@ -145,7 +145,7 @@ size_t Blitter_32bppBase::BufferSize(uin
 
	return sizeof(uint32_t) * width * height;
 
}
 

	
 
void Blitter_32bppBase::PaletteAnimate(const Palette &palette)
 
void Blitter_32bppBase::PaletteAnimate(const Palette &)
 
{
 
	/* By default, 32bpp doesn't have palette animation */
 
}
src/blitter/32bpp_sse_func.hpp
Show inline comments
 
@@ -154,7 +154,7 @@ static inline Colour AdjustBrightneSSE(C
 
}
 

	
 
GNU_TARGET(SSE_TARGET)
 
static inline __m128i AdjustBrightnessOfTwoPixels(__m128i from, uint32_t brightness)
 
static inline __m128i AdjustBrightnessOfTwoPixels([[maybe_unused]] __m128i from, [[maybe_unused]] uint32_t brightness)
 
{
 
#if (SSE_VERSION < 3)
 
	NOT_REACHED();
src/blitter/8bpp_base.cpp
Show inline comments
 
@@ -149,7 +149,7 @@ size_t Blitter_8bppBase::BufferSize(uint
 
	return static_cast<size_t>(width) * height;
 
}
 

	
 
void Blitter_8bppBase::PaletteAnimate(const Palette &palette)
 
void Blitter_8bppBase::PaletteAnimate(const Palette &)
 
{
 
	/* Video backend takes care of the palette animation */
 
}
src/blitter/null.hpp
Show inline comments
 
@@ -16,19 +16,19 @@
 
class Blitter_Null : public Blitter {
 
public:
 
	uint8_t GetScreenDepth() override { return 0; }
 
	void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) override {};
 
	void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal) override {};
 
	void Draw(Blitter::BlitterParams *, BlitterMode, ZoomLevel) override {};
 
	void DrawColourMappingRect(void *, int, int, PaletteID) override {};
 
	Sprite *Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator) override;
 
	void *MoveTo(void *video, int x, int y) override { return nullptr; };
 
	void SetPixel(void *video, int x, int y, uint8_t colour) override {};
 
	void DrawRect(void *video, int width, int height, uint8_t colour) override {};
 
	void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8_t colour, int width, int dash) override {};
 
	void CopyFromBuffer(void *video, const void *src, int width, int height) override {};
 
	void CopyToBuffer(const void *video, void *dst, int width, int height) override {};
 
	void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch) override {};
 
	void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y) override {};
 
	size_t BufferSize(uint width, uint height) override { return 0; };
 
	void PaletteAnimate(const Palette &palette) override { };
 
	void *MoveTo(void *, int, int) override { return nullptr; };
 
	void SetPixel(void *, int, int, uint8_t) override {};
 
	void DrawRect(void *, int, int, uint8_t) override {};
 
	void DrawLine(void *, int, int, int, int, int, int, uint8_t, int, int) override {};
 
	void CopyFromBuffer(void *, const void *, int, int) override {};
 
	void CopyToBuffer(const void *, void *, int, int) override {};
 
	void CopyImageToBuffer(const void *, void *, int, int, int) override {};
 
	void ScrollBuffer(void *, int &, int &, int &, int &, int, int) override {};
 
	size_t BufferSize(uint, uint) override { return 0; };
 
	void PaletteAnimate(const Palette &) override { };
 
	Blitter::PaletteAnimation UsePaletteAnimation() override { return Blitter::PALETTE_ANIMATION_NONE; };
 

	
 
	const char *GetName() override { return "null"; }
src/bootstrap_gui.cpp
Show inline comments
 
@@ -56,7 +56,7 @@ public:
 
		ResizeWindow(this, _screen.width, _screen.height);
 
	}
 

	
 
	void DrawWidget(const Rect &r, int widget) const override
 
	void DrawWidget(const Rect &r, int) const override
 
	{
 
		GfxFillRect(r.left, r.top, r.right, r.bottom, 4, FILLRECT_OPAQUE);
 
		GfxFillRect(r.left, r.top, r.right, r.bottom, 0, FILLRECT_CHECKER);
 
@@ -98,7 +98,7 @@ public:
 
		this->Window::Close();
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		if (widget == WID_BEM_MESSAGE) {
 
			*size = GetStringBoundingBox(STR_MISSING_GRAPHICS_ERROR);
 
@@ -114,7 +114,7 @@ public:
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		if (widget == WID_BEM_QUIT) {
 
			_exit_game = true;
 
@@ -159,7 +159,7 @@ public:
 
		this->BaseNetworkContentDownloadStatusWindow::Close();
 
	}
 

	
 
	void OnDownloadComplete(ContentID cid) override
 
	void OnDownloadComplete(ContentID) override
 
	{
 
		/* We have completed downloading. We can trigger finding the right set now. */
 
		BaseGraphics::FindSets();
 
@@ -214,7 +214,7 @@ public:
 
		this->Window::Close();
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		/* We cache the button size. This is safe as no reinit can happen here. */
 
		if (this->button_size.width == 0) {
 
@@ -244,7 +244,7 @@ public:
 
		DrawStringMultiLine(r.Shrink(WidgetDimensions::scaled.frametext), STR_MISSING_GRAPHICS_SET_MESSAGE, TC_FROMSTRING, SA_CENTER);
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_BAFD_YES:
 
@@ -334,7 +334,7 @@ public:
 
		EM_ASM({ if (window["openttd_bootstrap"]) openttd_bootstrap($0, $1); }, this->downloaded_bytes, this->total_bytes);
 
	}
 

	
 
	void OnDownloadProgress(const ContentInfo *ci, int bytes) override
 
	void OnDownloadProgress(const ContentInfo *, int bytes) override
 
	{
 
		/* A negative value means we are resetting; for example, when retrying or using a fallback. */
 
		if (bytes < 0) {
 
@@ -346,7 +346,7 @@ public:
 
		EM_ASM({ if (window["openttd_bootstrap"]) openttd_bootstrap($0, $1); }, this->downloaded_bytes, this->total_bytes);
 
	}
 

	
 
	void OnDownloadComplete(ContentID cid) override
 
	void OnDownloadComplete(ContentID) override
 
	{
 
		/* _exit_game is used to break out of the outer video driver's MainLoop. */
 
		_exit_game = true;
src/bridge_gui.cpp
Show inline comments
 
@@ -50,12 +50,11 @@ typedef GUIList<BuildBridgeData> GUIBrid
 
 * Callback executed after a build Bridge CMD has been called
 
 *
 
 * @param result Whether the build succeeded
 
 * @param cmd unused
 
 * @param end_tile End tile of the bridge.
 
 * @param tile_start start tile
 
 * @param transport_type transport type.
 
 */
 
void CcBuildBridge(Commands cmd, const CommandCost &result, TileIndex end_tile, TileIndex tile_start, TransportType transport_type, BridgeType, byte)
 
void CcBuildBridge(Commands, const CommandCost &result, TileIndex end_tile, TileIndex tile_start, TransportType transport_type, BridgeType, byte)
 
{
 
	if (result.Failed()) return;
 
	if (_settings_client.sound.confirm) SndPlayTileFx(SND_27_CONSTRUCTION_BRIDGE, end_tile);
 
@@ -175,7 +174,7 @@ public:
 
		this->last_sorting = this->bridges.GetListing();
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_BBS_DROPDOWN_ORDER: {
 
@@ -212,7 +211,7 @@ public:
 
		}
 
	}
 

	
 
	Point OnInitialPosition(int16_t sm_width, int16_t sm_height, int window_number) override
 
	Point OnInitialPosition([[maybe_unused]] int16_t sm_width, [[maybe_unused]] int16_t sm_height, [[maybe_unused]] int window_number) override
 
	{
 
		/* Position the window so hopefully the first bridge from the list is under the mouse pointer. */
 
		NWidgetBase *list = this->GetWidget<NWidgetBase>(WID_BBS_BRIDGE_LIST);
 
@@ -244,7 +243,7 @@ public:
 
		}
 
	}
 

	
 
	EventState OnKeyPress(char32_t key, uint16_t keycode) override
 
	EventState OnKeyPress([[maybe_unused]] char32_t key, uint16_t keycode) override
 
	{
 
		const uint8_t i = keycode - '1';
 
		if (i < 9 && i < this->bridges.size()) {
 
@@ -256,7 +255,7 @@ public:
 
		return ES_NOT_HANDLED;
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			default: break;
src/build_vehicle_gui.cpp
Show inline comments
 
@@ -1581,7 +1581,7 @@ struct BuildVehicleWindow : Window {
 
		this->eng_list.RebuildDone();
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_BV_SORT_ASCENDING_DESCENDING:
 
@@ -1688,7 +1688,7 @@ struct BuildVehicleWindow : Window {
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 
		/* When switching to original acceleration model for road vehicles, clear the selected sort criteria if it is not available now. */
 
@@ -1736,7 +1736,7 @@ struct BuildVehicleWindow : Window {
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_BV_LIST:
src/cheat_gui.cpp
Show inline comments
 
@@ -51,11 +51,10 @@ static int32_t _money_cheat_amount = 100
 
 * Note that the amount of money of a company must be changed through a command
 
 * rather than by setting a variable. Since the cheat data structure expects a
 
 * variable, the amount of given/taken money is used for this purpose.
 
 * @param new_value not used.
 
 * @param change_direction is -1 or +1 (down/up)
 
 * @return Amount of money cheat.
 
 */
 
static int32_t ClickMoneyCheat(int32_t new_value, int32_t change_direction)
 
static int32_t ClickMoneyCheat(int32_t, int32_t change_direction)
 
{
 
	Command<CMD_MONEY_CHEAT>::Post(Money(_money_cheat_amount) * change_direction);
 
	return _money_cheat_amount;
 
@@ -83,10 +82,9 @@ static int32_t ClickChangeCompanyCheat(i
 
/**
 
 * Allow (or disallow) changing production of all industries.
 
 * @param new_value new value
 
 * @param change_direction unused
 
 * @return New value allowing change of industry production.
 
 */
 
static int32_t ClickSetProdCheat(int32_t new_value, int32_t change_direction)
 
static int32_t ClickSetProdCheat(int32_t new_value, int32_t)
 
{
 
	_cheats.setup_prod.value = (new_value != 0);
 
	InvalidateWindowClassesData(WC_INDUSTRY_VIEW);
 
@@ -98,10 +96,9 @@ extern void EnginesMonthlyLoop();
 
/**
 
 * Handle changing of the current year.
 
 * @param new_value The chosen year to change to.
 
 * @param change_direction +1 (increase) or -1 (decrease).
 
 * @return New year.
 
 */
 
static int32_t ClickChangeDateCheat(int32_t new_value, int32_t change_direction)
 
static int32_t ClickChangeDateCheat(int32_t new_value, int32_t)
 
{
 
	/* Don't allow changing to an invalid year, or the current year. */
 
	auto new_year = Clamp(TimerGameCalendar::Year(new_value), CalendarTime::MIN_YEAR, CalendarTime::MAX_YEAR);
 
@@ -131,11 +128,10 @@ static int32_t ClickChangeDateCheat(int3
 
/**
 
 * Allow (or disallow) a change of the maximum allowed heightlevel.
 
 * @param new_value new value
 
 * @param change_direction unused
 
 * @return New value (or unchanged old value) of the maximum
 
 *         allowed heightlevel value.
 
 */
 
static int32_t ClickChangeMaxHlCheat(int32_t new_value, int32_t change_direction)
 
static int32_t ClickChangeMaxHlCheat(int32_t new_value, int32_t)
 
{
 
	new_value = Clamp(new_value, MIN_MAP_HEIGHT_LIMIT, MAX_MAP_HEIGHT_LIMIT);
 

	
 
@@ -301,7 +297,7 @@ struct CheatWindow : Window {
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		if (widget != WID_C_PANEL) return;
 

	
 
@@ -347,7 +343,7 @@ struct CheatWindow : Window {
 
		size->height = WidgetDimensions::scaled.framerect.Vertical() + this->line_height * lengthof(_cheats_ui);
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		Rect r = this->GetWidget<NWidgetBase>(WID_C_PANEL)->GetCurrentRect().Shrink(WidgetDimensions::scaled.framerect);
 
		uint btn = (pt.y - r.top) / this->line_height;
src/clear_cmd.cpp
Show inline comments
 
@@ -127,7 +127,7 @@ static void DrawTile_Clear(TileInfo *ti)
 
	DrawBridgeMiddle(ti);
 
}
 

	
 
static int GetSlopePixelZ_Clear(TileIndex tile, uint x, uint y, bool ground_vehicle)
 
static int GetSlopePixelZ_Clear(TileIndex tile, uint x, uint y, bool)
 
{
 
	int z;
 
	Slope tileh = GetTilePixelSlope(tile, &z);
 
@@ -135,7 +135,7 @@ static int GetSlopePixelZ_Clear(TileInde
 
	return z + GetPartialPixelZ(x & 0xF, y & 0xF, tileh);
 
}
 

	
 
static Foundation GetFoundation_Clear(TileIndex tile, Slope tileh)
 
static Foundation GetFoundation_Clear(TileIndex, Slope)
 
{
 
	return FOUNDATION_NONE;
 
}
 
@@ -341,7 +341,7 @@ get_out:;
 
	} while (--i);
 
}
 

	
 
static TrackStatus GetTileTrackStatus_Clear(TileIndex tile, TransportType mode, uint sub_mode, DiagDirection side)
 
static TrackStatus GetTileTrackStatus_Clear(TileIndex, TransportType, uint, DiagDirection)
 
{
 
	return 0;
 
}
 
@@ -365,12 +365,12 @@ static void GetTileDesc_Clear(TileIndex 
 
	td->owner[0] = GetTileOwner(tile);
 
}
 

	
 
static void ChangeTileOwner_Clear(TileIndex tile, Owner old_owner, Owner new_owner)
 
static void ChangeTileOwner_Clear(TileIndex, Owner, Owner)
 
{
 
	return;
 
}
 

	
 
static CommandCost TerraformTile_Clear(TileIndex tile, DoCommandFlag flags, int z_new, Slope tileh_new)
 
static CommandCost TerraformTile_Clear(TileIndex tile, DoCommandFlag flags, int, Slope)
 
{
 
	return Command<CMD_LANDSCAPE_CLEAR>::Do(flags, tile);
 
}
src/command.cpp
Show inline comments
 
@@ -280,11 +280,10 @@ void CommandHelperBase::LogCommandExecut
 
/**
 
 * Prepare for the test run of a command proc call.
 
 * @param cmd_flags Command flags.
 
 * @param tile Tile of command execution.
 
 * @param[in,out] cur_company Backup of current company at start of command execution.
 
 * @return True if test run can go ahead, false on error.
 
 */
 
bool CommandHelperBase::InternalExecutePrepTest(CommandFlags cmd_flags, TileIndex tile, Backup<CompanyID> &cur_company)
 
bool CommandHelperBase::InternalExecutePrepTest(CommandFlags cmd_flags, TileIndex, Backup<CompanyID> &cur_company)
 
{
 
	/* Always execute server and spectator commands as spectator */
 
	bool exec_as_spectator = (cmd_flags & (CMD_SPECTATOR | CMD_SERVER)) != 0;
 
@@ -314,7 +313,7 @@ bool CommandHelperBase::InternalExecuteP
 
 * @param[in,out] cur_company Backup of current company at start of command execution.
 
 * @return True if test run can go ahead, false on error.
 
 */
 
std::tuple<bool, bool, bool> CommandHelperBase::InternalExecuteValidateTestAndPrepExec(CommandCost &res, CommandFlags cmd_flags, bool estimate_only, bool network_command, Backup<CompanyID> &cur_company)
 
std::tuple<bool, bool, bool> CommandHelperBase::InternalExecuteValidateTestAndPrepExec(CommandCost &res, CommandFlags cmd_flags, bool estimate_only, bool network_command, [[maybe_unused]] Backup<CompanyID> &cur_company)
 
{
 
	BasePersistentStorageArray::SwitchMode(PSM_LEAVE_TESTMODE);
 
	SetTownRatingTestMode(false);
 
@@ -354,7 +353,7 @@ std::tuple<bool, bool, bool> CommandHelp
 
 * @param[in,out] cur_company Backup of current company at start of command execution.
 
 * @return Final command result.
 
 */
 
CommandCost CommandHelperBase::InternalExecuteProcessResult(Commands cmd, CommandFlags cmd_flags, const CommandCost &res_test, const CommandCost &res_exec, Money extra_cash, TileIndex tile, Backup<CompanyID> &cur_company)
 
CommandCost CommandHelperBase::InternalExecuteProcessResult(Commands cmd, CommandFlags cmd_flags, [[maybe_unused]] const CommandCost &res_test, const CommandCost &res_exec, Money extra_cash, TileIndex tile, Backup<CompanyID> &cur_company)
 
{
 
	BasePersistentStorageArray::SwitchMode(PSM_LEAVE_COMMAND);
 

	
src/command_func.h
Show inline comments
 
@@ -257,7 +257,7 @@ public:
 
protected:
 
	/** Helper to process a single ClientID argument. */
 
	template <class T>
 
	static inline void SetClientIdHelper(T &data)
 
	static inline void SetClientIdHelper([[maybe_unused]] T &data)
 
	{
 
		if constexpr (std::is_same_v<ClientID, T>) {
 
			if (data == INVALID_CLIENT_ID) data = CLIENT_ID_SERVER;
 
@@ -333,7 +333,7 @@ protected:
 

	
 
	/** Helper to process a single ClientID argument. */
 
	template <class T>
 
	static inline bool ClientIdIsSet(T &data)
 
	static inline bool ClientIdIsSet([[maybe_unused]] T &data)
 
	{
 
		if constexpr (std::is_same_v<ClientID, T>) {
 
			return data != INVALID_CLIENT_ID;
 
@@ -350,7 +350,7 @@ protected:
 
	}
 

	
 
	template<class Ttuple>
 
	static inline Money ExtractAdditionalMoney(Ttuple &values)
 
	static inline Money ExtractAdditionalMoney([[maybe_unused]] Ttuple &values)
 
	{
 
		if constexpr (std::is_same_v<std::tuple_element_t<1, Tret>, Money>) {
 
			return std::get<1>(values);
 
@@ -359,7 +359,7 @@ protected:
 
		}
 
	}
 

	
 
	static Tret Execute(StringID err_message, CommandCallback *callback, bool my_cmd, bool estimate_only, bool network_command, TileIndex tile, std::tuple<Targs...> args)
 
	static Tret Execute(StringID err_message, CommandCallback *callback, bool, bool estimate_only, bool network_command, TileIndex tile, std::tuple<Targs...> args)
 
	{
 
		/* Prevent recursion; it gives a mess over the network */
 
		RecursiveCommandCounter counter{};
src/company_gui.cpp
Show inline comments
 
@@ -396,7 +396,7 @@ struct CompanyFinancesWindow : Window {
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_CF_EXPS_CATEGORY:
 
@@ -492,7 +492,7 @@ struct CompanyFinancesWindow : Window {
 
		this->DrawWidgets();
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_CF_TOGGLE_SIZE: // toggle size
 
@@ -597,7 +597,7 @@ public:
 
		return ScaleGUITrad(28) + WidgetDimensions::scaled.hsep_normal + GetStringBoundingBox(this->String()).width + WidgetDimensions::scaled.dropdowntext.Horizontal();
 
	}
 

	
 
	uint Height(uint width) const override
 
	uint Height(uint) const override
 
	{
 
		return std::max(FONT_HEIGHT_NORMAL, ScaleGUITrad(12) + WidgetDimensions::scaled.vsep_normal);
 
	}
 
@@ -607,7 +607,7 @@ public:
 
		return true;
 
	}
 

	
 
	void Draw(const Rect &r, bool sel, Colours bg_colour) const override
 
	void Draw(const Rect &r, bool sel, Colours) const override
 
	{
 
		bool rtl = _current_text_dir == TD_RTL;
 
		int icon_y = CenterBounds(r.top, r.bottom, 0);
 
@@ -806,7 +806,7 @@ public:
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_SCL_SPACER_DROPDOWN: {
 
@@ -977,7 +977,7 @@ public:
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			/* Livery Class buttons */
 
@@ -1082,7 +1082,7 @@ public:
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 

	
 
@@ -1471,7 +1471,7 @@ public:
 
		this->number_dim = number_dim;
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_SCMF_HAS_MOUSTACHE_EARRING_TEXT:
 
@@ -1647,7 +1647,7 @@ public:
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			/* Toggle size, advanced/simple face selection */
 
@@ -1909,7 +1909,7 @@ struct CompanyInfrastructureWindow : Win
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		const Company *c = Company::Get((CompanyID)this->window_number);
 

	
 
@@ -2136,7 +2136,7 @@ struct CompanyInfrastructureWindow : Win
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 

	
 
@@ -2359,7 +2359,7 @@ struct CompanyWindow : Window
 
		this->DrawWidgets();
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_C_FACE: {
 
@@ -2545,7 +2545,7 @@ struct CompanyWindow : Window
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_C_NEW_FACE: DoSelectCompanyManagerFace(this); break;
 
@@ -2641,7 +2641,7 @@ struct CompanyWindow : Window
 
		this->SetDirty();
 
	}};
 

	
 
	void OnPlaceObject(Point pt, TileIndex tile) override
 
	void OnPlaceObject([[maybe_unused]] Point pt, TileIndex tile) override
 
	{
 
		if (Command<CMD_BUILD_OBJECT>::Post(STR_ERROR_CAN_T_BUILD_COMPANY_HEADQUARTERS, tile, OBJECT_HQ, 0) && !_shift_pressed) {
 
			ResetObjectToPlace();
 
@@ -2719,7 +2719,7 @@ struct BuyCompanyWindow : Window {
 
		this->company_value = hostile_takeover ? CalculateHostileTakeoverValue(c) : c->bankrupt_value;
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_BC_FACE:
 
@@ -2764,7 +2764,7 @@ struct BuyCompanyWindow : Window {
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_BC_NO:
src/company_manager_face.h
Show inline comments
 
@@ -93,7 +93,7 @@ static_assert(lengthof(_cmf_info) == CMF
 
 * @pre _cmf_info[cmfv].valid_values[ge] != 0
 
 * @return the requested bits
 
 */
 
static inline uint GetCompanyManagerFaceBits(CompanyManagerFace cmf, CompanyManagerFaceVariable cmfv, GenderEthnicity ge)
 
static inline uint GetCompanyManagerFaceBits(CompanyManagerFace cmf, CompanyManagerFaceVariable cmfv, [[maybe_unused]] GenderEthnicity ge)
 
{
 
	assert(_cmf_info[cmfv].valid_values[ge] != 0);
 

	
 
@@ -108,7 +108,7 @@ static inline uint GetCompanyManagerFace
 
 * @param val  the new value
 
 * @pre val < _cmf_info[cmfv].valid_values[ge]
 
 */
 
static inline void SetCompanyManagerFaceBits(CompanyManagerFace &cmf, CompanyManagerFaceVariable cmfv, GenderEthnicity ge, uint val)
 
static inline void SetCompanyManagerFaceBits(CompanyManagerFace &cmf, CompanyManagerFaceVariable cmfv, [[maybe_unused]] GenderEthnicity ge, uint val)
 
{
 
	assert(val < _cmf_info[cmfv].valid_values[ge]);
 

	
src/console_cmds.cpp
Show inline comments
 
@@ -86,7 +86,7 @@ public:
 
static ConsoleFileList _console_file_list; ///< File storage cache for the console.
 

	
 
/* console command defines */
 
#define DEF_CONSOLE_CMD(function) static bool function(byte argc, char *argv[])
 
#define DEF_CONSOLE_CMD(function) static bool function([[maybe_unused]] byte argc, [[maybe_unused]] char *argv[])
 
#define DEF_CONSOLE_HOOK(function) static ConsoleHookResult function(bool echo)
 

	
 

	
src/console_gui.cpp
Show inline comments
 
@@ -200,7 +200,7 @@ struct IConsoleWindow : Window
 
		if (_iconsole_cmdline.HandleCaret()) this->SetDirty();
 
	}
 

	
 
	EventState OnKeyPress(char32_t key, uint16_t keycode) override
 
	EventState OnKeyPress([[maybe_unused]] char32_t key, uint16_t keycode) override
 
	{
 
		if (_focused_window != this) return ES_NOT_HANDLED;
 

	
 
@@ -271,7 +271,7 @@ struct IConsoleWindow : Window
 
		return ES_HANDLED;
 
	}
 

	
 
	void InsertTextString(int wid, const char *str, bool marked, const char *caret, const char *insert_location, const char *replacement_end) override
 
	void InsertTextString(int, const char *str, bool marked, const char *caret, const char *insert_location, const char *replacement_end) override
 
	{
 
		if (_iconsole_cmdline.InsertString(str, marked, caret, insert_location, replacement_end)) {
 
			IConsoleWindow::scroll = 0;
 
@@ -323,7 +323,7 @@ struct IConsoleWindow : Window
 
		VideoDriver::GetInstance()->EditBoxGainedFocus();
 
	}
 

	
 
	void OnFocusLost(bool closing) override
 
	void OnFocusLost(bool) override
 
	{
 
		VideoDriver::GetInstance()->EditBoxLostFocus();
 
	}
src/core/pool_type.hpp
Show inline comments
 
@@ -275,13 +275,12 @@ struct Pool : PoolBase {
 

	
 
		/**
 
		 * Allocates space for new Titem at given memory address
 
		 * @param size size of Titem
 
		 * @param ptr where are we allocating the item?
 
		 * @return pointer to allocated memory (== ptr)
 
		 * @note use of this is strongly discouraged
 
		 * @pre the memory must not be allocated in the Pool!
 
		 */
 
		inline void *operator new(size_t size, void *ptr)
 
		inline void *operator new(size_t, void *ptr)
 
		{
 
			for (size_t i = 0; i < Tpool->first_unused; i++) {
 
				/* Don't allow creating new objects over existing.
 
@@ -375,7 +374,7 @@ struct Pool : PoolBase {
 
		 * @note when this function is called, PoolItem::Get(index) == nullptr.
 
		 * @note it's called only when !CleaningPool()
 
		 */
 
		static inline void PostDestructor(size_t index) { }
 
		static inline void PostDestructor([[maybe_unused]] size_t index) { }
 

	
 
		/**
 
		 * Returns an iterable ensemble of all valid Titem
src/cpu.cpp
Show inline comments
 
@@ -155,7 +155,7 @@ void ottd_cpuid(int info[4], int type)
 
	}
 
}
 
#else
 
void ottd_cpuid(int info[4], int type)
 
void ottd_cpuid(int info[4], int)
 
{
 
	info[0] = info[1] = info[2] = info[3] = 0;
 
}
src/date_gui.cpp
Show inline comments
 
@@ -55,7 +55,7 @@ struct SetDateWindow : Window {
 
		this->date.year = Clamp(this->date.year, min_year, max_year);
 
	}
 

	
 
	Point OnInitialPosition(int16_t sm_width, int16_t sm_height, int window_number) override
 
	Point OnInitialPosition([[maybe_unused]] int16_t sm_width, [[maybe_unused]] int16_t sm_height, [[maybe_unused]] int window_number) override
 
	{
 
		Point pt = { this->parent->left + this->parent->width / 2 - sm_width / 2, this->parent->top + this->parent->height / 2 - sm_height / 2 };
 
		return pt;
 
@@ -99,7 +99,7 @@ struct SetDateWindow : Window {
 
		ShowDropDownList(this, std::move(list), selected, widget);
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		Dimension d = {0, 0};
 
		switch (widget) {
 
@@ -137,7 +137,7 @@ struct SetDateWindow : Window {
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_SD_DAY:
src/depot_gui.cpp
Show inline comments
 
@@ -117,11 +117,10 @@ extern void DepotSortList(VehicleList *l
 

	
 
/**
 
 * This is the Callback method after the cloning attempt of a vehicle
 
 * @param cmd unused
 
 * @param result the result of the cloning command
 
 * @param veh_id cloned vehicle ID
 
 */
 
void CcCloneVehicle(Commands cmd, const CommandCost &result, VehicleID veh_id)
 
void CcCloneVehicle(Commands, const CommandCost &result, VehicleID veh_id)
 
{
 
	if (result.Failed()) return;
 

	
 
@@ -656,7 +655,7 @@ struct DepotWindow : Window {
 
		this->flag_size = maxdim(GetScaledSpriteSize(SPR_FLAG_VEH_STOPPED), GetScaledSpriteSize(SPR_FLAG_VEH_RUNNING));
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_D_MATRIX: {
 
@@ -704,7 +703,7 @@ struct DepotWindow : Window {
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		this->generate_list = true;
 
	}
 
@@ -760,7 +759,7 @@ struct DepotWindow : Window {
 
		this->DrawWidgets();
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_D_MATRIX: // List
 
@@ -842,7 +841,7 @@ struct DepotWindow : Window {
 
		Command<CMD_RENAME_DEPOT>::Post(STR_ERROR_CAN_T_RENAME_DEPOT, this->GetDepotIndex(), str);
 
	}
 

	
 
	bool OnRightClick(Point pt, int widget) override
 
	bool OnRightClick([[maybe_unused]] Point pt, int widget) override
 
	{
 
		if (widget != WID_D_MATRIX) return false;
 

	
src/disaster_vehicle.cpp
Show inline comments
 
@@ -690,7 +690,7 @@ static bool DisasterTick_Submarine(Disas
 
}
 

	
 

	
 
static bool DisasterTick_NULL(DisasterVehicle *v)
 
static bool DisasterTick_NULL(DisasterVehicle *)
 
{
 
	return true;
 
}
src/dock_gui.cpp
Show inline comments
 
@@ -45,7 +45,7 @@ static void ShowBuildDocksDepotPicker(Wi
 

	
 
static Axis _ship_depot_direction;
 

	
 
void CcBuildDocks(Commands cmd, const CommandCost &result, TileIndex tile)
 
void CcBuildDocks(Commands, const CommandCost &result, TileIndex tile)
 
{
 
	if (result.Failed()) return;
 

	
 
@@ -53,7 +53,7 @@ void CcBuildDocks(Commands cmd, const Co
 
	if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
 
}
 

	
 
void CcPlaySound_CONSTRUCTION_WATER(Commands cmd, const CommandCost &result, TileIndex tile)
 
void CcPlaySound_CONSTRUCTION_WATER(Commands, const CommandCost &result, TileIndex tile)
 
{
 
	if (result.Succeeded() && _settings_client.sound.confirm) SndPlayTileFx(SND_02_CONSTRUCTION_WATER, tile);
 
}
 
@@ -120,7 +120,7 @@ struct BuildDocksToolbarWindow : Window 
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 

	
 
@@ -148,7 +148,7 @@ struct BuildDocksToolbarWindow : Window 
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_DT_CANAL: // Build canal button
 
@@ -189,7 +189,7 @@ struct BuildDocksToolbarWindow : Window 
 
		this->last_clicked_widget = (DockToolbarWidgets)widget;
 
	}
 

	
 
	void OnPlaceObject(Point pt, TileIndex tile) override
 
	void OnPlaceObject([[maybe_unused]] Point pt, TileIndex tile) override
 
	{
 
		switch (this->last_clicked_widget) {
 
			case WID_DT_CANAL: // Build canal button
 
@@ -242,12 +242,12 @@ struct BuildDocksToolbarWindow : Window 
 
		}
 
	}
 

	
 
	void OnPlaceDrag(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt) override
 
	void OnPlaceDrag(ViewportPlaceMethod select_method, [[maybe_unused]] ViewportDragDropSelectionProcess select_proc, [[maybe_unused]] Point pt) override
 
	{
 
		VpSelectTilesWithMethod(pt.x, pt.y, select_method);
 
	}
 

	
 
	void OnPlaceMouseUp(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile) override
 
	void OnPlaceMouseUp([[maybe_unused]] ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, [[maybe_unused]] Point pt, TileIndex start_tile, TileIndex end_tile) override
 
	{
 
		if (pt.x != -1) {
 
			switch (select_proc) {
 
@@ -278,7 +278,7 @@ struct BuildDocksToolbarWindow : Window 
 
		CloseWindowByClass(WC_BUILD_BRIDGE);
 
	}
 

	
 
	void OnPlacePresize(Point pt, TileIndex tile_from) override
 
	void OnPlacePresize([[maybe_unused]] Point pt, TileIndex tile_from) override
 
	{
 
		TileIndex tile_to = tile_from;
 

	
 
@@ -453,7 +453,7 @@ public:
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case BDSW_LT_OFF:
 
@@ -468,7 +468,7 @@ public:
 
		}
 
	}
 

	
 
	void OnRealtimeTick(uint delta_ms) override
 
	void OnRealtimeTick([[maybe_unused]] uint delta_ms) override
 
	{
 
		CheckRedrawStationCoverage(this);
 
	}
 
@@ -525,7 +525,7 @@ public:
 
		UpdateDocksDirection();
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_BDD_X:
 
@@ -559,7 +559,7 @@ public:
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_BDD_X:
src/engine_gui.cpp
Show inline comments
 
@@ -77,7 +77,7 @@ struct EnginePreviewWindow : Window {
 
		this->flags |= WF_STICKY;
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		if (widget != WID_EP_QUESTION) return;
 

	
 
@@ -122,7 +122,7 @@ struct EnginePreviewWindow : Window {
 
		DrawStringMultiLine(r.left, r.right, y, r.bottom, GetEngineInfoString(engine), TC_FROMSTRING, SA_CENTER);
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_EP_YES:
 
@@ -134,7 +134,7 @@ struct EnginePreviewWindow : Window {
 
		}
 
	}
 

	
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 

	
src/error_gui.cpp
Show inline comments
 
@@ -188,7 +188,7 @@ public:
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_EM_MESSAGE: {
 
@@ -217,7 +217,7 @@ public:
 
		}
 
	}
 

	
 
	Point OnInitialPosition(int16_t sm_width, int16_t sm_height, int window_number) override
 
	Point OnInitialPosition([[maybe_unused]] int16_t sm_width, [[maybe_unused]] int16_t sm_height, [[maybe_unused]] int window_number) override
 
	{
 
		/* Position (0, 0) given, center the window. */
 
		if (this->position.x == 0 && this->position.y == 0) {
 
@@ -253,7 +253,7 @@ public:
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		/* If company gets shut down, while displaying an error about it, remove the error message. */
 
		if (this->face != INVALID_COMPANY && !Company::IsValidID(this->face)) this->Close();
src/fileio.cpp
Show inline comments
 
@@ -474,7 +474,7 @@ static std::string ExtractString(char *b
 
	return StrMakeValid(std::string(buffer, length));
 
}
 

	
 
bool TarScanner::AddFile(const std::string &filename, size_t basepath_length, const std::string &tar_filename)
 
bool TarScanner::AddFile(const std::string &filename, size_t, [[maybe_unused]] const std::string &tar_filename)
 
{
 
	/* No tar within tar. */
 
	assert(tar_filename.empty());
src/fios.cpp
Show inline comments
 
@@ -275,10 +275,9 @@ public:
 
/**
 
 * Try to add a fios item set with the given filename.
 
 * @param filename        the full path to the file to read
 
 * @param basepath_length amount of characters to chop of before to get a relative filename
 
 * @return true if the file is added.
 
 */
 
bool FiosFileScanner::AddFile(const std::string &filename, size_t basepath_length, const std::string &tar_filename)
 
bool FiosFileScanner::AddFile(const std::string &filename, size_t, const std::string &)
 
{
 
	auto sep = filename.rfind('.');
 
	if (sep == std::string::npos) return false;
 
@@ -531,7 +530,7 @@ void FiosGetScenarioList(SaveLoadOperati
 
	FiosGetFileList(fop, &FiosGetScenarioListCallback, subdir, file_list);
 
}
 

	
 
static std::tuple<FiosType, std::string> FiosGetHeightmapListCallback(SaveLoadOperation fop, const std::string &file, const std::string_view ext)
 
static std::tuple<FiosType, std::string> FiosGetHeightmapListCallback(SaveLoadOperation, const std::string &file, const std::string_view ext)
 
{
 
	/* Show heightmap files
 
	 * .PNG PNG Based heightmap files
 
@@ -640,7 +639,7 @@ public:
 
		this->scanned = true;
 
	}
 

	
 
	bool AddFile(const std::string &filename, size_t basepath_length, const std::string &tar_filename) override
 
	bool AddFile(const std::string &filename, size_t, const std::string &) override
 
	{
 
		FILE *f = FioFOpenFile(filename, "r", SCENARIO_DIR);
 
		if (f == nullptr) return false;
 
@@ -729,7 +728,7 @@ FiosNumberedSaveName::FiosNumberedSaveNa
 
	static std::string _prefix; ///< Static as the lambda needs access to it.
 

	
 
	/* Callback for FiosFileScanner. */
 
	static FiosGetTypeAndNameProc *proc = [](SaveLoadOperation fop, const std::string &file, const std::string_view ext) {
 
	static FiosGetTypeAndNameProc *proc = [](SaveLoadOperation, const std::string &file, const std::string_view ext) {
 
		if (StrEqualsIgnoreCase(ext, ".sav") && StrStartsWith(file, _prefix)) return std::tuple(FIOS_TYPE_FILE, std::string{});
 
		return std::tuple(FIOS_TYPE_INVALID, std::string{});
 
	};
src/fios_gui.cpp
Show inline comments
 
@@ -282,13 +282,13 @@ private:
 
	QueryString filter_editbox; ///< Filter editbox;
 
	std::vector<FiosItem *> display_list; ///< Filtered display list
 

	
 
	static void SaveGameConfirmationCallback(Window *w, bool confirmed)
 
	static void SaveGameConfirmationCallback(Window *, bool confirmed)
 
	{
 
		/* File name has already been written to _file_to_saveload */
 
		if (confirmed) _switch_mode = SM_SAVE_GAME;
 
	}
 

	
 
	static void SaveHeightmapConfirmationCallback(Window *w, bool confirmed)
 
	static void SaveHeightmapConfirmationCallback(Window *, bool confirmed)
 
	{
 
		/* File name has already been written to _file_to_saveload */
 
		if (confirmed) _switch_mode = SM_SAVE_HEIGHTMAP;
 
@@ -561,7 +561,7 @@ public:
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_SL_BACKGROUND:
 
@@ -594,7 +594,7 @@ public:
 
		this->DrawWidgets();
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_SL_SORT_BYNAME: // Sort save names by name
 
@@ -716,7 +716,7 @@ public:
 
		}
 
	}
 

	
 
	void OnMouseOver(Point pt, int widget) override
 
	void OnMouseOver([[maybe_unused]] Point pt, int widget) override
 
	{
 
		if (widget == WID_SL_DRIVES_DIRECTORIES_LIST) {
 
			auto it = this->vscroll->GetScrolledItemFromWidget(this->display_list, pt.y, this, WID_SL_DRIVES_DIRECTORIES_LIST, WidgetDimensions::scaled.inset.top);
 
@@ -735,7 +735,7 @@ public:
 
		}
 
	}
 

	
 
	EventState OnKeyPress(char32_t key, uint16_t keycode) override
 
	EventState OnKeyPress([[maybe_unused]] char32_t key, uint16_t keycode) override
 
	{
 
		if (keycode == WKC_ESC) {
 
			this->Close();
src/fontcache.cpp
Show inline comments
 
@@ -204,5 +204,5 @@ bool HasAntialiasedFonts()
 

	
 
#if !defined(_WIN32) && !defined(__APPLE__) && !defined(WITH_FONTCONFIG) && !defined(WITH_COCOA)
 

	
 
bool SetFallbackFont(FontCacheSettings *settings, const std::string &language_isocode, int winlangid, MissingGlyphSearcher *callback) { return false; }
 
bool SetFallbackFont(FontCacheSettings *, const std::string &, int, MissingGlyphSearcher *) { return false; }
 
#endif /* !defined(_WIN32) && !defined(__APPLE__) && !defined(WITH_FONTCONFIG) && !defined(WITH_COCOA) */
src/fontcache/freetypefontcache.cpp
Show inline comments
 
@@ -63,7 +63,7 @@ FreeTypeFontCache::FreeTypeFontCache(Fon
 
	this->SetFontSize(fs, face, pixels);
 
}
 

	
 
void FreeTypeFontCache::SetFontSize(FontSize fs, FT_Face face, int pixels)
 
void FreeTypeFontCache::SetFontSize(FontSize, FT_Face, int pixels)
 
{
 
	if (pixels == 0) {
 
		/* Try to determine a good height based on the minimal height recommended by the font. */
src/fontcache/spritefontcache.h
Show inline comments
 
@@ -30,7 +30,7 @@ public:
 
	virtual uint GetGlyphWidth(GlyphID key);
 
	virtual bool GetDrawGlyphShadow();
 
	virtual GlyphID MapCharToGlyph(char32_t key) { assert(IsPrintable(key)); return SPRITE_GLYPH | key; }
 
	virtual const void *GetFontTable(uint32_t tag, size_t &length) { length = 0; return nullptr; }
 
	const void *GetFontTable(uint32_t, size_t &length) override { length = 0; return nullptr; }
 
	virtual std::string GetFontName() { return "sprite"; }
 
	virtual bool IsBuiltInFont() { return true; }
 
};
src/framerate_gui.cpp
Show inline comments
 
@@ -460,7 +460,7 @@ struct FramerateWindow : Window {
 
		ResizeWindow(this, 0, (std::max(MIN_ELEMENTS, this->num_displayed) - MIN_ELEMENTS) * FONT_HEIGHT_NORMAL);
 
	}
 

	
 
	void OnRealtimeTick(uint delta_ms) override
 
	void OnRealtimeTick([[maybe_unused]] uint delta_ms) override
 
	{
 
		/* Check if the shaded state has changed, switch caption text if it has */
 
		if (this->small != this->IsShaded()) {
 
@@ -540,7 +540,7 @@ struct FramerateWindow : Window {
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_FRW_RATE_GAMELOOP:
 
@@ -693,7 +693,7 @@ struct FramerateWindow : Window {
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_FRW_TIMES_NAMES:
 
@@ -780,7 +780,7 @@ struct FrametimeGraphWindow : Window {
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		if (widget == WID_FGW_GRAPH) {
 
			SetDParam(0, 100);
 
@@ -883,7 +883,7 @@ struct FrametimeGraphWindow : Window {
 
		this->UpdateScale();
 
	}};
 

	
 
	void OnRealtimeTick(uint delta_ms) override
 
	void OnRealtimeTick([[maybe_unused]] uint delta_ms) override
 
	{
 
		this->SetDirty();
 
	}
src/game/game_gui.cpp
Show inline comments
 
@@ -130,7 +130,7 @@ struct GSConfigWindow : public Window {
 
		this->vscroll->SetCount(this->visible_settings.size());
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_GSC_SETTINGS:
 
@@ -238,7 +238,7 @@ struct GSConfigWindow : public Window {
 
		this->DrawWidgets();
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		if (widget >= WID_GSC_TEXTFILE && widget < WID_GSC_TEXTFILE + TFT_CONTENT_END) {
 
			if (GameConfig::GetConfig() == nullptr) return;
 
@@ -371,7 +371,7 @@ struct GSConfigWindow : public Window {
 
		SetValue(index);
 
	}
 

	
 
	void OnDropdownClose(Point pt, int widget, int index, bool instant_close) override
 
	void OnDropdownClose(Point, int widget, int, bool) override
 
	{
 
		/* We cannot raise the dropdown button just yet. OnClick needs some hint, whether
 
		 * the same dropdown button was clicked again, and then not open the dropdown again.
 
@@ -398,7 +398,7 @@ struct GSConfigWindow : public Window {
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 

	
src/game/game_text.cpp
Show inline comments
 
@@ -121,7 +121,7 @@ struct TranslationWriter : LanguageWrite
 
	{
 
	}
 

	
 
	void WriteHeader(const LanguagePackHeader *header)
 
	void WriteHeader(const LanguagePackHeader *)
 
	{
 
		/* We don't use the header. */
 
	}
 
@@ -131,7 +131,7 @@ struct TranslationWriter : LanguageWrite
 
		/* Nothing to do. */
 
	}
 

	
 
	void WriteLength(uint length)
 
	void WriteLength(uint)
 
	{
 
		/* We don't write the length. */
 
	}
 
@@ -159,7 +159,7 @@ struct StringNameWriter : HeaderWriter {
 
		if (stringid == (int)this->strings.size()) this->strings.emplace_back(name);
 
	}
 

	
 
	void Finalise(const StringData &data)
 
	void Finalise(const StringData &)
 
	{
 
		/* Nothing to do. */
 
	}
 
@@ -185,7 +185,7 @@ public:
 
		this->FileScanner::Scan(".txt", directory, false);
 
	}
 

	
 
	bool AddFile(const std::string &filename, size_t basepath_length, const std::string &tar_filename) override
 
	bool AddFile(const std::string &filename, size_t, const std::string &) override
 
	{
 
		if (exclude == filename) return true;
 

	
src/gamelog.cpp
Show inline comments
 
@@ -168,13 +168,13 @@ void Gamelog::Print(std::function<void(c
 
}
 

	
 

	
 
/* virtual */ void LoggedChangeMode::FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names, GamelogActionType action_type)
 
/* virtual */ void LoggedChangeMode::FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &, GamelogActionType)
 
{
 
	/* Changing landscape, or going from scenario editor to game or back. */
 
	fmt::format_to(output_iterator, "New game mode: {} landscape: {}", this->mode, this->landscape);
 
}
 

	
 
/* virtual */ void LoggedChangeRevision::FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names, GamelogActionType action_type)
 
/* virtual */ void LoggedChangeRevision::FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &, GamelogActionType)
 
{
 
	/* The game was loaded in a diffferent version than before. */
 
	fmt::format_to(output_iterator, "Revision text changed to {}, savegame version {}, ",
 
@@ -189,7 +189,7 @@ void Gamelog::Print(std::function<void(c
 
	fmt::format_to(output_iterator, "modified, _openttd_newgrf_version = 0x{:08x}", this->newgrf);
 
}
 

	
 
/* virtual */ void LoggedChangeOldVersion::FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names, GamelogActionType action_type)
 
/* virtual */ void LoggedChangeOldVersion::FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &, GamelogActionType)
 
{
 
	/* The game was loaded from before 0.7.0-beta1. */
 
	fmt::format_to(output_iterator, "Conversion from ");
 
@@ -221,13 +221,13 @@ void Gamelog::Print(std::function<void(c
 
	}
 
}
 

	
 
/* virtual */ void LoggedChangeSettingChanged::FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names, GamelogActionType action_type)
 
/* virtual */ void LoggedChangeSettingChanged::FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &, GamelogActionType)
 
{
 
	/* A setting with the SF_NO_NETWORK flag got changed; these settings usually affect NewGRFs, such as road side or wagon speed limits. */
 
	fmt::format_to(output_iterator, "Setting changed: {} : {} -> {}", this->name, this->oldval, this->newval);
 
}
 

	
 
/* virtual */ void LoggedChangeGRFAdd::FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names, GamelogActionType action_type)
 
/* virtual */ void LoggedChangeGRFAdd::FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names, GamelogActionType)
 
{
 
	/* A NewGRF got added to the game, either at the start of the game (never an issue), or later on when it could be an issue. */
 
	const GRFConfig *gc = FindGRFConfig(this->grfid, FGCM_EXACT, &this->md5sum);
 
@@ -256,7 +256,7 @@ void Gamelog::Print(std::function<void(c
 
	}
 
}
 

	
 
/* virtual */ void LoggedChangeGRFChanged::FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names, GamelogActionType action_type)
 
/* virtual */ void LoggedChangeGRFChanged::FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names, GamelogActionType)
 
{
 
	/* Another version of the same NewGRF got loaded. */
 
	const GRFConfig *gc = FindGRFConfig(this->grfid, FGCM_EXACT, &this->md5sum);
 
@@ -266,7 +266,7 @@ void Gamelog::Print(std::function<void(c
 
	grf_names[this->grfid] = gc;
 
}
 

	
 
/* virtual */ void LoggedChangeGRFParameterChanged::FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names, GamelogActionType action_type)
 
/* virtual */ void LoggedChangeGRFParameterChanged::FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names, GamelogActionType)
 
{
 
	/* A parameter of a NewGRF got changed after the game was started. */
 
	auto gm = grf_names.find(this->grfid);
 
@@ -275,7 +275,7 @@ void Gamelog::Print(std::function<void(c
 
	if (gm == grf_names.end()) fmt::format_to(output_iterator, ". Gamelog inconsistency: GrfID was never added!");
 
}
 

	
 
/* virtual */ void LoggedChangeGRFMoved::FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names, GamelogActionType action_type)
 
/* virtual */ void LoggedChangeGRFMoved::FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names, GamelogActionType)
 
{
 
	/* The order of NewGRFs got changed, which might cause some other NewGRFs to behave differently. */
 
	auto gm = grf_names.find(this->grfid);
 
@@ -285,7 +285,7 @@ void Gamelog::Print(std::function<void(c
 
	if (gm == grf_names.end()) fmt::format_to(output_iterator, ". Gamelog inconsistency: GrfID was never added!");
 
}
 

	
 
/* virtual */ void LoggedChangeGRFBug::FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names, GamelogActionType action_type)
 
/* virtual */ void LoggedChangeGRFBug::FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names, GamelogActionType)
 
{
 
	/* A specific bug in a NewGRF, that could cause wide spread problems, has been noted during the execution of the game. */
 
	auto gm = grf_names.find(this->grfid);
 
@@ -296,7 +296,7 @@ void Gamelog::Print(std::function<void(c
 
	if (gm == grf_names.end()) fmt::format_to(output_iterator, ". Gamelog inconsistency: GrfID was never added!");
 
}
 

	
 
/* virtual */ void LoggedChangeEmergencySave::FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names, GamelogActionType action_type)
 
/* virtual */ void LoggedChangeEmergencySave::FormatTo(std::back_insert_iterator<std::string> &, GrfIDMapping &, GamelogActionType)
 
{
 
	/* At one point the savegame was made during the handling of a game crash.
 
	 * The generic code already mentioned the emergency savegame, and there is no extra information to log. */
src/genworld_gui.cpp
Show inline comments
 
@@ -520,7 +520,7 @@ struct GenerateLandscapeWindow : public 
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 
		/* Update the climate buttons */
 
@@ -588,7 +588,7 @@ struct GenerateLandscapeWindow : public 
 

	
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		Dimension d{0, (uint)FONT_HEIGHT_NORMAL};
 
		const StringID *strs = nullptr;
 
@@ -681,7 +681,7 @@ struct GenerateLandscapeWindow : public 
 
		*size = maxdim(*size, d);
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_GL_TEMPERATE:
 
@@ -1132,7 +1132,7 @@ struct CreateScenarioWindow : public Win
 
		this->DrawWidgets();
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		StringID str = STR_JUST_INT;
 
		switch (widget) {
 
@@ -1159,7 +1159,7 @@ struct CreateScenarioWindow : public Win
 
		*size = maxdim(*size, d);
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_CS_TEMPERATE:
 
@@ -1372,7 +1372,7 @@ static const StringID _generation_class_
 
static_assert(lengthof(_generation_class_table) == GWP_CLASS_COUNT);
 

	
 

	
 
static void AbortGeneratingWorldCallback(Window *w, bool confirmed)
 
static void AbortGeneratingWorldCallback(Window *, bool confirmed)
 
{
 
	if (confirmed) {
 
		AbortGeneratingWorld();
 
@@ -1388,7 +1388,7 @@ struct GenerateProgressWindow : public W
 
		this->InitNested();
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_GP_ABORT:
 
@@ -1403,7 +1403,7 @@ struct GenerateProgressWindow : public W
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_GP_PROGRESS_BAR: {
src/gfx_layout_fallback.cpp
Show inline comments
 
@@ -65,7 +65,7 @@ public:
 
		int CountRuns() const override;
 
		const ParagraphLayouter::VisualRun &GetVisualRun(int run) const override;
 

	
 
		int GetInternalCharLength(char32_t c) const override { return 1; }
 
		int GetInternalCharLength(char32_t) const override { return 1; }
 
	};
 

	
 
	const char32_t *buffer_begin; ///< Begin of the buffer.
 
@@ -265,7 +265,7 @@ const ParagraphLayouter::VisualRun &Fall
 
 * @param length The length of the paragraph.
 
 * @param runs   The font mapping of this paragraph.
 
 */
 
FallbackParagraphLayout::FallbackParagraphLayout(char32_t *buffer, int length, FontMap &runs) : buffer_begin(buffer), buffer(buffer), runs(runs)
 
FallbackParagraphLayout::FallbackParagraphLayout(char32_t *buffer, [[maybe_unused]] int length, FontMap &runs) : buffer_begin(buffer), buffer(buffer), runs(runs)
 
{
 
	assert(runs.rbegin()->first == length);
 
}
src/goal_gui.cpp
Show inline comments
 
@@ -63,7 +63,7 @@ struct GoalListWindow : public Window {
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_GOAL_GLOBAL_BUTTON:
 
@@ -168,7 +168,7 @@ struct GoalListWindow : public Window {
 
		return num;
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		if (widget != WID_GOAL_LIST) return;
 
		Dimension d = GetStringBoundingBox(STR_GOALS_NONE);
 
@@ -269,7 +269,7 @@ struct GoalListWindow : public Window {
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 
		this->vscroll->SetCount(this->CountLines());
 
@@ -370,7 +370,7 @@ struct GoalQuestionWindow : public Windo
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_GQ_BUTTON_1:
 
@@ -390,7 +390,7 @@ struct GoalQuestionWindow : public Windo
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		if (widget != WID_GQ_QUESTION) return;
 

	
src/graph_gui.cpp
Show inline comments
 
@@ -76,7 +76,7 @@ struct GraphLegendWindow : Window {
 
		DrawString(tr.left, tr.right, CenterBounds(tr.top, tr.bottom, FONT_HEIGHT_NORMAL), STR_COMPANY_NAME_COMPANY_NUM, HasBit(_legend_excluded_companies, cid) ? TC_BLACK : TC_WHITE);
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		if (!IsInsideMM(widget, WID_GL_FIRST_COMPANY, MAX_COMPANIES + WID_GL_FIRST_COMPANY)) return;
 

	
 
@@ -95,7 +95,7 @@ struct GraphLegendWindow : Window {
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 
		if (Company::IsValidID(data)) return;
 
@@ -493,7 +493,7 @@ protected:
 
	}
 

	
 
public:
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		if (widget != this->graph_widget) return;
 

	
 
@@ -536,12 +536,12 @@ public:
 
		DrawGraph(r);
 
	}
 

	
 
	virtual OverflowSafeInt64 GetGraphData(const Company *c, int j)
 
	virtual OverflowSafeInt64 GetGraphData(const Company *, int)
 
	{
 
		return INVALID_DATAPOINT;
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		/* Clicked on legend? */
 
		if (widget == WID_CV_KEY_BUTTON) ShowGraphLegend();
 
@@ -557,7 +557,7 @@ public:
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 
		this->UpdateStatistics(true);
 
@@ -782,7 +782,7 @@ struct PerformanceHistoryGraphWindow : B
 
		return c->old_economy[j].performance_history;
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		if (widget == WID_PHG_DETAILED_PERFORMANCE) ShowPerformanceRatingDetail();
 
		this->BaseGraphWindow::OnClick(pt, widget, click_count);
 
@@ -916,7 +916,7 @@ struct PaymentRatesGraphWindow : BaseGra
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		if (widget != WID_CPR_MATRIX) {
 
			BaseGraphWindow::UpdateWidgetSize(widget, size, padding, fill, resize);
 
@@ -975,7 +975,7 @@ struct PaymentRatesGraphWindow : BaseGra
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_CPR_ENABLE_CARGOES:
 
@@ -1025,7 +1025,7 @@ struct PaymentRatesGraphWindow : BaseGra
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 
		this->UpdatePaymentRates();
 
@@ -1142,7 +1142,7 @@ struct PerformanceRatingDetailWindow : W
 
	uint score_detail_left;
 
	uint score_detail_right;
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_PRD_SCORE_FIRST:
 
@@ -1279,7 +1279,7 @@ struct PerformanceRatingDetailWindow : W
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		/* Check which button is clicked */
 
		if (IsInsideMM(widget, WID_PRD_COMPANY_FIRST, WID_PRD_COMPANY_LAST + 1)) {
 
@@ -1307,7 +1307,7 @@ struct PerformanceRatingDetailWindow : W
 
	 * @param data the company ID of the company that is going to be removed
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 
		/* Disable the companies who are not active */
src/group_gui.cpp
Show inline comments
 
@@ -384,7 +384,7 @@ public:
 
		*this->sorting = this->vehgroups.GetListing();
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_GL_LIST_GROUP:
 
@@ -442,7 +442,7 @@ public:
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (data == 0) {
 
			/* This needs to be done in command-scope to enforce rebuilding before resorting invalid data */
 
@@ -651,7 +651,7 @@ public:
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_GL_SORT_BY_ORDER: // Flip sorting method ascending/descending
 
@@ -1169,14 +1169,12 @@ static void CcCreateGroup(GroupID gid, V
 

	
 
/**
 
 * Opens a 'Rename group' window for newly created group.
 
 * @param cmd Unused.
 
 * @param result Did command succeed?
 
 * @param new_group ID of the created group.
 
 * @param vt Vehicle type.
 
 * @param parent_group Parent group of the new group.
 
 * @see CmdCreateGroup
 
 */
 
void CcCreateGroup(Commands cmd, const CommandCost &result, GroupID new_group, VehicleType vt, GroupID parent_group)
 
void CcCreateGroup(Commands, const CommandCost &result, GroupID new_group, VehicleType vt, GroupID)
 
{
 
	if (result.Failed()) return;
 

	
 
@@ -1186,12 +1184,10 @@ void CcCreateGroup(Commands cmd, const C
 

	
 
/**
 
 * Open rename window after adding a vehicle to a new group via drag and drop.
 
 * @param cmd Unused.
 
 * @param result Did command succeed?
 
 * @param new_group ID of the created group.
 
 * @param veh_id vehicle to add to a group
 
 */
 
void CcAddVehicleNewGroup(Commands cmd, const CommandCost &result, GroupID new_group, GroupID, VehicleID veh_id, bool, const VehicleListIdentifier &)
 
void CcAddVehicleNewGroup(Commands, const CommandCost &result, GroupID new_group, GroupID, VehicleID, bool, const VehicleListIdentifier &)
 
{
 
	if (result.Failed()) return;
 

	
src/help_gui.cpp
Show inline comments
 
@@ -129,7 +129,7 @@ struct HelpWindow : public Window {
 
		this->EnableTextfileButton(LICENSE_FILENAME, WID_HW_LICENSE);
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_HW_README:
src/highscore_gui.cpp
Show inline comments
 
@@ -65,12 +65,12 @@ struct EndGameHighScoreBaseWindow : Wind
 
		return pt;
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, [[maybe_unused]] int widget, [[maybe_unused]] int click_count) override
 
	{
 
		this->Close();
 
	}
 

	
 
	EventState OnKeyPress(char32_t key, uint16_t keycode) override
 
	EventState OnKeyPress([[maybe_unused]] char32_t key, uint16_t keycode) override
 
	{
 
		/* All keys are 'handled' by this window but we want to make
 
		 * sure that 'quit' still works correctly. Not handling the
src/hotkeys.cpp
Show inline comments
 
@@ -348,7 +348,7 @@ void SaveHotkeysToConfig()
 
	SaveLoadHotkeys(true);
 
}
 

	
 
void HandleGlobalHotkeys(char32_t key, uint16_t keycode)
 
void HandleGlobalHotkeys([[maybe_unused]] char32_t key, uint16_t keycode)
 
{
 
	for (HotkeyList *list : *_hotkey_lists) {
 
		if (list->global_hotkey_handler == nullptr) continue;
src/industry_cmd.cpp
Show inline comments
 
@@ -206,7 +206,7 @@ Industry::~Industry()
 
 * Invalidating some stuff after removing item from the pool.
 
 * @param index index of deleted item
 
 */
 
void Industry::PostDestructor(size_t index)
 
void Industry::PostDestructor(size_t)
 
{
 
	InvalidateWindowData(WC_INDUSTRY_DIRECTORY, 0, IDIWD_FORCE_REBUILD);
 
	SetWindowDirty(WC_BUILD_INDUSTRY, 0);
 
@@ -385,7 +385,7 @@ static void DrawTile_Industry(TileInfo *
 
	}
 
}
 

	
 
static int GetSlopePixelZ_Industry(TileIndex tile, uint x, uint y, bool ground_vehicle)
 
static int GetSlopePixelZ_Industry(TileIndex tile, uint, uint, bool)
 
{
 
	return GetTileMaxPixelZ(tile);
 
}
 
@@ -952,7 +952,7 @@ static bool ClickTile_Industry(TileIndex
 
	return true;
 
}
 

	
 
static TrackStatus GetTileTrackStatus_Industry(TileIndex tile, TransportType mode, uint sub_mode, DiagDirection side)
 
static TrackStatus GetTileTrackStatus_Industry(TileIndex, TransportType, uint, DiagDirection)
 
{
 
	return 0;
 
}
 
@@ -1094,10 +1094,9 @@ void PlantRandomFarmField(const Industry
 
/**
 
 * Search callback function for ChopLumberMillTrees
 
 * @param tile to test
 
 * @param user_data that is passed by the caller.  In this case, nothing
 
 * @return the result of the test
 
 */
 
static bool SearchLumberMillTrees(TileIndex tile, void *user_data)
 
static bool SearchLumberMillTrees(TileIndex tile, void *)
 
{
 
	if (IsTileType(tile, MP_TREES) && GetTreeGrowth(tile) > 2) { ///< 3 and up means all fully grown trees
 
		/* found a tree */
 
@@ -1225,10 +1224,9 @@ void OnTick_Industry()
 

	
 
/**
 
 * Check the conditions of #CHECK_NOTHING (Always succeeds).
 
 * @param tile %Tile to perform the checking.
 
 * @return Succeeded or failed command.
 
 */
 
static CommandCost CheckNewIndustry_NULL(TileIndex tile)
 
static CommandCost CheckNewIndustry_NULL(TileIndex)
 
{
 
	return CommandCost();
 
}
src/industry_gui.cpp
Show inline comments
 
@@ -243,12 +243,11 @@ void SortIndustryTypes()
 

	
 
/**
 
 * Command callback. In case of failure to build an industry, show an error message.
 
 * @param cmd    Unused.
 
 * @param result Result of the command.
 
 * @param tile   Tile where the industry is placed.
 
 * @param indtype Industry type.
 
 */
 
void CcBuildIndustry(Commands cmd, const CommandCost &result, TileIndex tile, IndustryType indtype, uint32_t, bool, uint32_t)
 
void CcBuildIndustry(Commands, const CommandCost &result, TileIndex tile, IndustryType indtype, uint32_t, bool, uint32_t)
 
{
 
	if (result.Succeeded()) return;
 

	
 
@@ -425,7 +424,7 @@ public:
 
		this->SetupArrays();
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_DPI_MATRIX_WIDGET: {
 
@@ -598,7 +597,7 @@ public:
 
		}
 
	}
 

	
 
	static void AskManyRandomIndustriesCallback(Window *w, bool confirmed)
 
	static void AskManyRandomIndustriesCallback(Window *, bool confirmed)
 
	{
 
		if (!confirmed) return;
 

	
 
@@ -613,7 +612,7 @@ public:
 
		}
 
	}
 

	
 
	static void AskRemoveAllIndustriesCallback(Window *w, bool confirmed)
 
	static void AskRemoveAllIndustriesCallback(Window *, bool confirmed)
 
	{
 
		if (!confirmed) return;
 

	
 
@@ -629,7 +628,7 @@ public:
 
		MarkWholeScreenDirty();
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_DPI_CREATE_RANDOM_INDUSTRIES_WIDGET: {
 
@@ -693,7 +692,7 @@ public:
 
		this->vscroll->SetCapacityFromWidget(this, WID_DPI_MATRIX_WIDGET);
 
	}
 

	
 
	void OnPlaceObject(Point pt, TileIndex tile) override
 
	void OnPlaceObject([[maybe_unused]] Point pt, TileIndex tile) override
 
	{
 
		bool success = true;
 
		/* We do not need to protect ourselves against "Random Many Industries" in this mode */
 
@@ -753,7 +752,7 @@ public:
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 
		this->SetupArrays();
 
@@ -989,12 +988,12 @@ public:
 
		if (widget == WID_IV_CAPTION) SetDParam(0, this->window_number);
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		if (widget == WID_IV_INFO) size->height = this->info_height;
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_IV_INFO: {
 
@@ -1142,7 +1141,7 @@ public:
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 
		const Industry *i = Industry::Get(this->window_number);
 
@@ -1617,7 +1616,7 @@ protected:
 
	}
 

	
 
public:
 
	IndustryDirectoryWindow(WindowDesc *desc, WindowNumber number) : Window(desc), industry_editbox(MAX_FILTER_LENGTH * MAX_CHAR_LENGTH, MAX_FILTER_LENGTH)
 
	IndustryDirectoryWindow(WindowDesc *desc, WindowNumber) : Window(desc), industry_editbox(MAX_FILTER_LENGTH * MAX_CHAR_LENGTH, MAX_FILTER_LENGTH)
 
	{
 
		this->CreateNestedTree();
 
		this->vscroll = this->GetScrollbar(WID_ID_SCROLLBAR);
 
@@ -1694,7 +1693,7 @@ public:
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_ID_DROPDOWN_ORDER: {
 
@@ -1732,7 +1731,7 @@ public:
 
	}
 

	
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_ID_DROPDOWN_ORDER:
 
@@ -1821,7 +1820,7 @@ public:
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		switch (data) {
 
			case IDIWD_FORCE_REBUILD:
 
@@ -2586,7 +2585,7 @@ struct IndustryCargoesWindow : public Wi
 
		CargoesField::cargo_field_width = CargoesField::cargo_border.width * 2 + CargoesField::cargo_line.width * CargoesField::max_cargoes + CargoesField::cargo_space.width * (CargoesField::max_cargoes - 1);
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_IC_PANEL:
 
@@ -2924,7 +2923,7 @@ struct IndustryCargoesWindow : public Wi
 
	 * - data = NUM_INDUSTRYTYPES: Stop sending updates to the smallmap window.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 
		if (data == NUM_INDUSTRYTYPES) {
 
@@ -3021,7 +3020,7 @@ struct IndustryCargoesWindow : public Wi
 
		return true;
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_IC_PANEL: {
 
@@ -3108,7 +3107,7 @@ struct IndustryCargoesWindow : public Wi
 
		}
 
	}
 

	
 
	bool OnTooltip(Point pt, int widget, TooltipCloseCondition close_cond) override
 
	bool OnTooltip([[maybe_unused]] Point pt, int widget, TooltipCloseCondition close_cond) override
 
	{
 
		if (widget != WID_IC_PANEL) return false;
 

	
src/intro_gui.cpp
Show inline comments
 
@@ -190,7 +190,7 @@ struct SelectGameWindow : public Window 
 
		this->mouse_idle_pos = _cursor.pos;
 
	}
 

	
 
	void OnRealtimeTick(uint delta_ms) override
 
	void OnRealtimeTick([[maybe_unused]] uint delta_ms) override
 
	{
 
		/* Move the main game viewport according to intro viewport commands. */
 

	
 
@@ -264,7 +264,7 @@ struct SelectGameWindow : public Window 
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 
		this->SetWidgetLoweredState(WID_SGI_TEMPERATE_LANDSCAPE, _settings_newgame.game_creation.landscape == LT_TEMPERATE);
 
@@ -297,7 +297,7 @@ struct SelectGameWindow : public Window 
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		StringID str = 0;
 
		switch (widget) {
 
@@ -326,7 +326,7 @@ struct SelectGameWindow : public Window 
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		/* Do not create a network server when you (just) have closed one of the game
 
		 * creation/load windows for the network server. */
 
@@ -507,7 +507,7 @@ void ShowSelectGameWindow()
 
	new SelectGameWindow(&_select_game_desc);
 
}
 

	
 
static void AskExitGameCallback(Window *w, bool confirmed)
 
static void AskExitGameCallback(Window *, bool confirmed)
 
{
 
	if (confirmed) {
 
		_survey.Transmit(NetworkSurveyHandler::Reason::EXIT, true);
 
@@ -527,7 +527,7 @@ void AskExitGame()
 
}
 

	
 

	
 
static void AskExitToGameMenuCallback(Window *w, bool confirmed)
 
static void AskExitToGameMenuCallback(Window *, bool confirmed)
 
{
 
	if (confirmed) {
 
		_switch_mode = SM_MENU;
src/landscape.cpp
Show inline comments
 
@@ -978,10 +978,9 @@ static void CreateDesertOrRainForest(uin
 
/**
 
 * Find the spring of a river.
 
 * @param tile The tile to consider for being the spring.
 
 * @param user_data Ignored data.
 
 * @return True iff it is suitable as a spring.
 
 */
 
static bool FindSpring(TileIndex tile, void *user_data)
 
static bool FindSpring(TileIndex tile, void *)
 
{
 
	int referenceHeight;
 
	if (!IsTileFlat(tile, &referenceHeight) || IsWaterTile(tile)) return false;
 
@@ -1216,13 +1215,13 @@ static int32_t River_EndNodeCheck(const 
 
}
 

	
 
/* AyStar callback for getting the cost of the current node. */
 
static int32_t River_CalculateG(AyStar *aystar, AyStarNode *current, OpenListNode *parent)
 
static int32_t River_CalculateG(AyStar *, AyStarNode *, OpenListNode *)
 
{
 
	return 1 + RandomRange(_settings_game.game_creation.river_route_random);
 
}
 

	
 
/* AyStar callback for getting the estimated cost to the destination. */
 
static int32_t River_CalculateH(AyStar *aystar, AyStarNode *current, OpenListNode *parent)
 
static int32_t River_CalculateH(AyStar *aystar, AyStarNode *current, OpenListNode *)
 
{
 
	return DistanceManhattan(*(TileIndex*)aystar->user_target, current->tile);
 
}
 
@@ -1283,10 +1282,9 @@ static const uint RIVER_HASH_SIZE = 8; /
 
/**
 
 * Simple hash function for river tiles to be used by AyStar.
 
 * @param tile The tile to hash.
 
 * @param dir The unused direction.
 
 * @return The hash for the tile.
 
 */
 
static uint River_Hash(TileIndex tile, Trackdir dir)
 
static uint River_Hash(TileIndex tile, Trackdir)
 
{
 
	return GB(TileHash(TileX(tile), TileY(tile)), 0, RIVER_HASH_SIZE);
 
}
src/league_gui.cpp
Show inline comments
 
@@ -127,7 +127,7 @@ public:
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		if (widget != WID_PLT_BACKGROUND) return;
 

	
 
@@ -175,7 +175,7 @@ public:
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (data == 0) {
 
			/* This needs to be done in command-scope to enforce rebuilding before resorting invalid data */
 
@@ -354,7 +354,7 @@ public:
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		if (widget != WID_SLT_BACKGROUND) return;
 

	
 
@@ -394,7 +394,7 @@ public:
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		if (widget != WID_SLT_BACKGROUND) return;
 

	
 
@@ -411,7 +411,7 @@ public:
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		this->BuildTable();
 
		this->ReInit();
src/linkgraph/linkgraph_gui.cpp
Show inline comments
 
@@ -580,7 +580,7 @@ void LinkGraphLegendWindow::SetOverlay(s
 
	}
 
}
 

	
 
void LinkGraphLegendWindow::UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
void LinkGraphLegendWindow::UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize)
 
{
 
	if (IsInsideMM(widget, WID_LGL_SATURATION_FIRST, WID_LGL_SATURATION_LAST + 1)) {
 
		StringID str = STR_NULL;
 
@@ -639,7 +639,7 @@ void LinkGraphLegendWindow::DrawWidget(c
 
	}
 
}
 

	
 
bool LinkGraphLegendWindow::OnTooltip(Point pt, int widget, TooltipCloseCondition close_cond)
 
bool LinkGraphLegendWindow::OnTooltip([[maybe_unused]] Point, int widget, TooltipCloseCondition close_cond)
 
{
 
	if (IsInsideMM(widget, WID_LGL_COMPANY_FIRST, WID_LGL_COMPANY_LAST + 1)) {
 
		if (this->IsWidgetDisabled(widget)) {
 
@@ -686,7 +686,7 @@ void LinkGraphLegendWindow::UpdateOverla
 
	this->overlay->SetCargoMask(mask);
 
}
 

	
 
void LinkGraphLegendWindow::OnClick(Point pt, int widget, int click_count)
 
void LinkGraphLegendWindow::OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count)
 
{
 
	/* Check which button is clicked */
 
	if (IsInsideMM(widget, WID_LGL_COMPANY_FIRST, WID_LGL_COMPANY_LAST + 1)) {
 
@@ -718,7 +718,7 @@ void LinkGraphLegendWindow::OnClick(Poin
 
 * @param data ignored
 
 * @param gui_scope ignored
 
 */
 
void LinkGraphLegendWindow::OnInvalidateData(int data, bool gui_scope)
 
void LinkGraphLegendWindow::OnInvalidateData([[maybe_unused]] int data, [[maybe_unused]] bool gui_scope)
 
{
 
	if (this->num_cargo != _sorted_cargo_specs.size()) {
 
		this->Close();
src/linkgraph/linkgraph_gui.h
Show inline comments
 
@@ -108,10 +108,10 @@ public:
 
	LinkGraphLegendWindow(WindowDesc *desc, int window_number);
 
	void SetOverlay(std::shared_ptr<LinkGraphOverlay> overlay);
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override;
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override;
 
	void DrawWidget(const Rect &r, int widget) const override;
 
	bool OnTooltip(Point pt, int widget, TooltipCloseCondition close_cond) override;
 
	void OnClick(Point pt, int widget, int click_count) override;
 
	bool OnTooltip([[maybe_unused]] Point pt, int widget, TooltipCloseCondition close_cond) override;
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override;
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override;
 

	
 
private:
src/linkgraph/mcf.cpp
Show inline comments
 
@@ -108,10 +108,9 @@ public:
 

	
 
	/**
 
	 * Setup the node to start iterating at.
 
	 * @param source Unused.
 
	 * @param node Node to start iterating at.
 
	 */
 
	void SetNode(NodeID source, NodeID node)
 
	void SetNode(NodeID, NodeID node)
 
	{
 
		this->i = this->job[node].edges.cbegin();
 
		this->end = this->job[node].edges.cend();
 
@@ -197,7 +196,7 @@ public:
 
 * @return True if base + the new edge would be better than the path associated
 
 * with this annotation.
 
 */
 
bool DistanceAnnotation::IsBetter(const DistanceAnnotation *base, uint cap,
 
bool DistanceAnnotation::IsBetter(const DistanceAnnotation *base, uint,
 
		int free_cap, uint dist) const
 
{
 
	/* If any of the paths is disconnected, the other one is better. If both
src/main_gui.cpp
Show inline comments
 
@@ -78,7 +78,7 @@ bool HandlePlacePushButton(Window *w, in
 
}
 

	
 

	
 
void CcPlaySound_EXPLOSION(Commands cmd, const CommandCost &result, TileIndex tile)
 
void CcPlaySound_EXPLOSION(Commands, const CommandCost &result, TileIndex tile)
 
{
 
	if (result.Succeeded() && _settings_client.sound.confirm) SndPlayTileFx(SND_12_EXPLOSION, tile);
 
}
 
@@ -443,7 +443,7 @@ struct MainWindow : Window
 
		}
 
	}
 

	
 
	bool OnTooltip(Point pt, int widget, TooltipCloseCondition close_cond) override
 
	bool OnTooltip([[maybe_unused]] Point pt, int widget, TooltipCloseCondition close_cond) override
 
	{
 
		if (widget != WID_M_VIEWPORT) return false;
 
		return this->viewport->overlay->ShowTooltip(pt, close_cond);
 
@@ -454,7 +454,7 @@ struct MainWindow : Window
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 
		/* Forward the message to the appropriate toolbar (ingame or scenario editor) */
src/misc_cmd.cpp
Show inline comments
 
@@ -121,10 +121,9 @@ CommandCost CmdDecreaseLoan(DoCommandFla
 
/**
 
 * In case of an unsafe unpause, we want the
 
 * user to confirm that it might crash.
 
 * @param w         unused
 
 * @param confirmed whether the user confirmed their action
 
 */
 
static void AskUnsafeUnpauseCallback(Window *w, bool confirmed)
 
static void AskUnsafeUnpauseCallback(Window *, bool confirmed)
 
{
 
	if (confirmed) {
 
		Command<CMD_PAUSE>::Post(PM_PAUSED_ERROR, false);
 
@@ -191,11 +190,10 @@ CommandCost CmdPause(DoCommandFlag flags
 

	
 
/**
 
 * Change the financial flow of your company.
 
 * @param flags operation to perform
 
 * @param amount the amount of money to receive (if positive), or spend (if negative)
 
 * @return the cost of this operation or an error
 
 */
 
CommandCost CmdMoneyCheat(DoCommandFlag flags, Money amount)
 
CommandCost CmdMoneyCheat(DoCommandFlag, Money amount)
 
{
 
	return CommandCost(EXPENSES_OTHER, -amount);
 
}
src/misc_gui.cpp
Show inline comments
 
@@ -88,7 +88,7 @@ public:
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		if (widget != WID_LI_BACKGROUND) return;
 

	
 
@@ -339,7 +339,7 @@ public:
 
		::ShowNewGRFInspectWindow(GetGrfSpecFeature(this->tile), static_cast<uint32_t>(this->tile));
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_LI_LOCATION:
 
@@ -357,7 +357,7 @@ public:
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 

	
 
@@ -483,7 +483,7 @@ struct AboutWindow : public Window {
 
		if (widget == WID_A_COPYRIGHT) SetDParamStr(0, _openttd_revision_year);
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		if (widget != WID_A_SCROLLING_TEXT) return;
 

	
 
@@ -676,7 +676,7 @@ struct TooltipsWindow : public Window
 
		CLRBITS(this->flags, WF_WHITE_BORDER);
 
	}
 

	
 
	Point OnInitialPosition(int16_t sm_width, int16_t sm_height, int window_number) override
 
	Point OnInitialPosition([[maybe_unused]] int16_t sm_width, [[maybe_unused]] int16_t sm_height, [[maybe_unused]] int window_number) override
 
	{
 
		/* Find the free screen space between the main toolbar at the top, and the statusbar at the bottom.
 
		 * Add a fixed distance 2 so the tooltip floats free from both bars.
 
@@ -696,7 +696,7 @@ struct TooltipsWindow : public Window
 
		return pt;
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		/* There is only one widget. */
 
		CopyInDParam(this->params);
 
@@ -980,7 +980,7 @@ struct QueryStringWindow : public Window
 
		this->ReInit();
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		if (widget == WID_QS_DEFAULT && (this->flags & QSF_ENABLE_DEFAULT) == 0) {
 
			/* We don't want this widget to show! */
 
@@ -1019,7 +1019,7 @@ struct QueryStringWindow : public Window
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_QS_DEFAULT:
 
@@ -1115,7 +1115,7 @@ struct QueryWindow : public Window {
 
		this->Window::Close();
 
	}
 

	
 
	void FindWindowPlacementAndResize(int def_width, int def_height) override
 
	void FindWindowPlacementAndResize([[maybe_unused]] int def_width, [[maybe_unused]] int def_height) override
 
	{
 
		/* Position query window over the calling window, ensuring it's within screen bounds. */
 
		this->left = SoftClamp(parent->left + (parent->width / 2) - (this->width / 2), 0, _screen.width - this->width);
 
@@ -1133,7 +1133,7 @@ struct QueryWindow : public Window {
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		if (widget != WID_Q_TEXT) return;
 

	
 
@@ -1151,7 +1151,7 @@ struct QueryWindow : public Window {
 
				this->message, TC_FROMSTRING, SA_CENTER);
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_Q_YES: {
 
@@ -1174,7 +1174,7 @@ struct QueryWindow : public Window {
 
		}
 
	}
 

	
 
	EventState OnKeyPress(char32_t key, uint16_t keycode) override
 
	EventState OnKeyPress([[maybe_unused]] char32_t key, uint16_t keycode) override
 
	{
 
		/* ESC closes the window, Enter confirms the action */
 
		switch (keycode) {
src/music/allegro_m.cpp
Show inline comments
 
@@ -26,7 +26,7 @@ static MIDI *_midi = nullptr;
 
 */
 
extern int _allegro_instance_count;
 

	
 
const char *MusicDriver_Allegro::Start(const StringList &param)
 
const char *MusicDriver_Allegro::Start(const StringList &)
 
{
 
	if (_allegro_instance_count == 0 && install_allegro(SYSTEM_AUTODETECT, &errno, nullptr)) {
 
		Debug(driver, 0, "allegro: install_allegro failed '{}'", allegro_error);
src/music/cocoa_m.cpp
Show inline comments
 
@@ -79,7 +79,7 @@ static void DoSetVolume()
 
/**
 
 * Initialized the MIDI player, including QuickTime initialization.
 
 */
 
const char *MusicDriver_Cocoa::Start(const StringList &parm)
 
const char *MusicDriver_Cocoa::Start(const StringList &)
 
{
 
	if (NewMusicPlayer(&_player) != noErr) return "failed to create music player";
 

	
src/music/extmidi.cpp
Show inline comments
 
@@ -95,7 +95,7 @@ bool MusicDriver_ExtMidi::IsSongPlaying(
 
	return this->pid != -1;
 
}
 

	
 
void MusicDriver_ExtMidi::SetVolume(byte vol)
 
void MusicDriver_ExtMidi::SetVolume(byte)
 
{
 
	Debug(driver, 1, "extmidi: set volume not implemented");
 
}
src/music/null_m.h
Show inline comments
 
@@ -15,17 +15,17 @@
 
/** The music player that does nothing. */
 
class MusicDriver_Null : public MusicDriver {
 
public:
 
	const char *Start(const StringList &param) override { return nullptr; }
 
	const char *Start(const StringList &) override { return nullptr; }
 

	
 
	void Stop() override { }
 

	
 
	void PlaySong(const MusicSongInfo &song) override { }
 
	void PlaySong(const MusicSongInfo &) override { }
 

	
 
	void StopSong() override { }
 

	
 
	bool IsSongPlaying() override { return true; }
 

	
 
	void SetVolume(byte vol) override { }
 
	void SetVolume(byte) override { }
 
	const char *GetName() const override { return "null"; }
 
};
 

	
src/music/win32_m.cpp
Show inline comments
 
@@ -59,7 +59,7 @@ static byte ScaleVolume(byte original, b
 
}
 

	
 

	
 
void CALLBACK MidiOutProc(HMIDIOUT hmo, UINT wMsg, DWORD_PTR dwInstance, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
 
void CALLBACK MidiOutProc(HMIDIOUT hmo, UINT wMsg, DWORD_PTR, DWORD_PTR dwParam1, DWORD_PTR)
 
{
 
	if (wMsg == MOM_DONE) {
 
		MIDIHDR *hdr = (LPMIDIHDR)dwParam1;
 
@@ -108,7 +108,7 @@ static void TransmitStandardSysex(MidiSy
 
 * Realtime MIDI playback service routine.
 
 * This is called by the multimedia timer.
 
 */
 
void CALLBACK TimerCallback(UINT uTimerID, UINT, DWORD_PTR dwUser, DWORD_PTR, DWORD_PTR)
 
void CALLBACK TimerCallback(UINT uTimerID, UINT, DWORD_PTR, DWORD_PTR, DWORD_PTR)
 
{
 
	/* Ensure only one timer callback is running at once, and prevent races on status flags */
 
	std::unique_lock<std::mutex> mutex_lock(_midi.lock, std::defer_lock);
src/music_gui.cpp
Show inline comments
 
@@ -477,7 +477,7 @@ struct MusicTrackSelectionWindow : publi
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 
		for (int i = 0; i < 6; i++) {
 
@@ -492,7 +492,7 @@ struct MusicTrackSelectionWindow : publi
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_MTS_PLAYLIST: {
 
@@ -560,7 +560,7 @@ struct MusicTrackSelectionWindow : publi
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_MTS_LIST_LEFT: { // add to playlist
 
@@ -674,7 +674,7 @@ struct MusicWindow : public Window {
 
			);
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			/* Make sure that WID_M_SHUFFLE and WID_M_PROGRAMME have the same size.
 
@@ -763,7 +763,7 @@ struct MusicWindow : public Window {
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 
		for (int i = 0; i < 6; i++) {
 
@@ -779,7 +779,7 @@ struct MusicWindow : public Window {
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_M_PREV: // skip to prev
src/network/core/address.cpp
Show inline comments
 
@@ -98,10 +98,9 @@ std::string NetworkAddress::GetAddressAs
 

	
 
/**
 
 * Helper function to resolve without opening a socket.
 
 * @param runp information about the socket to try not
 
 * @return the opened socket or INVALID_SOCKET
 
 */
 
static SOCKET ResolveLoopProc(addrinfo *runp)
 
static SOCKET ResolveLoopProc(addrinfo *)
 
{
 
	/* We just want the first 'entry', so return a valid socket. */
 
	return !INVALID_SOCKET;
src/network/core/http_curl.cpp
Show inline comments
 
@@ -174,7 +174,7 @@ void HttpThread()
 
		 * up to a second before this callback is called. There is little we can
 
		 * do about this. */
 
		curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);
 
		curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, +[](void *userdata, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow) -> int {
 
		curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, +[](void *userdata, curl_off_t /*dltotal*/, curl_off_t /*dlnow*/, curl_off_t /*ultotal*/, curl_off_t /*ulnow*/) -> int {
 
			const HTTPCallback *callback = static_cast<HTTPCallback *>(userdata);
 
			return (callback->IsCancelled() || _http_thread_exit) ? 1 : 0;
 
		});
src/network/core/http_none.cpp
Show inline comments
 
@@ -18,7 +18,7 @@
 

	
 
#include "../../safeguards.h"
 

	
 
/* static */ void NetworkHTTPSocketHandler::Connect(const std::string &uri, HTTPCallback *callback, const std::string data)
 
/* static */ void NetworkHTTPSocketHandler::Connect(const std::string &, HTTPCallback *callback, const std::string)
 
{
 
	/* No valid HTTP backend was compiled in, so we fail all HTTP requests. */
 
	callback->OnFailure();
src/network/core/http_winhttp.cpp
Show inline comments
 
@@ -186,7 +186,7 @@ void NetworkHTTPRequest::WinHttpCallback
 
	}
 
}
 

	
 
static void CALLBACK StaticWinHttpCallback(HINTERNET handle, DWORD_PTR context, DWORD code, void *info, DWORD length)
 
static void CALLBACK StaticWinHttpCallback(HINTERNET, DWORD_PTR context, DWORD code, void *info, DWORD length)
 
{
 
	if (context == 0) return;
 

	
src/network/core/os_abstraction.cpp
Show inline comments
 
@@ -129,7 +129,7 @@ bool NetworkError::HasError() const
 
 * @param d The socket to set the non-blocking more for.
 
 * @return True if setting the non-blocking mode succeeded, otherwise false.
 
 */
 
bool SetNonBlocking(SOCKET d)
 
bool SetNonBlocking([[maybe_unused]] SOCKET d)
 
{
 
#if defined(_WIN32)
 
	u_long nonblocking = 1;
 
@@ -147,7 +147,7 @@ bool SetNonBlocking(SOCKET d)
 
 * @param d The socket to disable the delaying for.
 
 * @return True if disabling the delaying succeeded, otherwise false.
 
 */
 
bool SetNoDelay(SOCKET d)
 
bool SetNoDelay([[maybe_unused]] SOCKET d)
 
{
 
#ifdef __EMSCRIPTEN__
 
	return true;
src/network/core/tcp.cpp
Show inline comments
 
@@ -62,7 +62,7 @@ void NetworkTCPSocketHandler::CloseSocke
 
 * @param error Whether we quit under an error condition or not.
 
 * @return new status of the connection.
 
 */
 
NetworkRecvStatus NetworkTCPSocketHandler::CloseConnection(bool error)
 
NetworkRecvStatus NetworkTCPSocketHandler::CloseConnection([[maybe_unused]] bool error)
 
{
 
	this->MarkClosed();
 
	this->writable = false;
src/network/core/tcp.h
Show inline comments
 
@@ -121,7 +121,7 @@ public:
 
	 * Callback when the connection succeeded.
 
	 * @param s the socket that we opened
 
	 */
 
	virtual void OnConnect(SOCKET s) {}
 
	virtual void OnConnect([[maybe_unused]] SOCKET s) {}
 

	
 
	/**
 
	 * Callback for when the connection attempt failed.
src/network/core/tcp_admin.cpp
Show inline comments
 
@@ -32,7 +32,7 @@ NetworkAdminSocketHandler::NetworkAdminS
 
	this->sock = s;
 
}
 

	
 
NetworkRecvStatus NetworkAdminSocketHandler::CloseConnection(bool error)
 
NetworkRecvStatus NetworkAdminSocketHandler::CloseConnection(bool)
 
{
 
	delete this;
 
	return NETWORK_RECV_STATUS_CLIENT_QUIT;
 
@@ -129,40 +129,40 @@ NetworkRecvStatus NetworkAdminSocketHand
 
	return NETWORK_RECV_STATUS_MALFORMED_PACKET;
 
}
 

	
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_ADMIN_JOIN(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_ADMIN_JOIN); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_ADMIN_QUIT(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_ADMIN_QUIT); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_ADMIN_UPDATE_FREQUENCY(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_ADMIN_UPDATE_FREQUENCY); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_ADMIN_POLL(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_ADMIN_POLL); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_ADMIN_CHAT(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_ADMIN_CHAT); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_ADMIN_EXTERNAL_CHAT(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_ADMIN_EXTERNAL_CHAT); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_ADMIN_RCON(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_ADMIN_RCON); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_ADMIN_GAMESCRIPT(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_ADMIN_GAMESCRIPT); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_ADMIN_PING(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_ADMIN_PING); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_ADMIN_JOIN(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_ADMIN_JOIN); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_ADMIN_QUIT(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_ADMIN_QUIT); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_ADMIN_UPDATE_FREQUENCY(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_ADMIN_UPDATE_FREQUENCY); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_ADMIN_POLL(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_ADMIN_POLL); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_ADMIN_CHAT(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_ADMIN_CHAT); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_ADMIN_EXTERNAL_CHAT(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_ADMIN_EXTERNAL_CHAT); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_ADMIN_RCON(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_ADMIN_RCON); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_ADMIN_GAMESCRIPT(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_ADMIN_GAMESCRIPT); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_ADMIN_PING(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_ADMIN_PING); }
 

	
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_FULL(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_FULL); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_BANNED(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_BANNED); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_ERROR(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_ERROR); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_PROTOCOL(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_PROTOCOL); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_WELCOME(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_WELCOME); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_NEWGAME(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_NEWGAME); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_SHUTDOWN(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_SHUTDOWN); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_FULL(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_FULL); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_BANNED(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_BANNED); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_ERROR(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_ERROR); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_PROTOCOL(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_PROTOCOL); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_WELCOME(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_WELCOME); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_NEWGAME(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_NEWGAME); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_SHUTDOWN(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_SHUTDOWN); }
 

	
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_DATE(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_DATE); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_CLIENT_JOIN(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_CLIENT_JOIN); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_CLIENT_INFO(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_CLIENT_INFO); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_CLIENT_UPDATE(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_CLIENT_UPDATE); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_CLIENT_QUIT(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_CLIENT_QUIT); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_CLIENT_ERROR(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_CLIENT_ERROR); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_COMPANY_NEW(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_COMPANY_NEW); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_COMPANY_INFO(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_COMPANY_INFO); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_COMPANY_UPDATE(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_COMPANY_UPDATE); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_COMPANY_REMOVE(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_COMPANY_REMOVE); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_COMPANY_ECONOMY(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_COMPANY_ECONOMY); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_COMPANY_STATS(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_COMPANY_STATS); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_CHAT(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_CHAT); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_RCON(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_RCON); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_CONSOLE(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_CONSOLE); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_CMD_NAMES(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_CMD_NAMES); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_CMD_LOGGING(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_CMD_LOGGING); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_RCON_END(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_RCON_END); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_PONG(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_PONG); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_DATE(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_DATE); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_CLIENT_JOIN(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_CLIENT_JOIN); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_CLIENT_INFO(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_CLIENT_INFO); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_CLIENT_UPDATE(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_CLIENT_UPDATE); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_CLIENT_QUIT(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_CLIENT_QUIT); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_CLIENT_ERROR(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_CLIENT_ERROR); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_COMPANY_NEW(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_COMPANY_NEW); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_COMPANY_INFO(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_COMPANY_INFO); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_COMPANY_UPDATE(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_COMPANY_UPDATE); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_COMPANY_REMOVE(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_COMPANY_REMOVE); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_COMPANY_ECONOMY(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_COMPANY_ECONOMY); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_COMPANY_STATS(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_COMPANY_STATS); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_CHAT(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_CHAT); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_RCON(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_RCON); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_CONSOLE(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_CONSOLE); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_CMD_NAMES(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_CMD_NAMES); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_CMD_LOGGING(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_CMD_LOGGING); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_RCON_END(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_RCON_END); }
 
NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_PONG(Packet *) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_PONG); }
src/network/core/tcp_content.cpp
Show inline comments
 
@@ -170,13 +170,13 @@ bool NetworkContentSocketHandler::Receiv
 
	return false;
 
}
 

	
 
bool NetworkContentSocketHandler::Receive_CLIENT_INFO_LIST(Packet *p) { return this->ReceiveInvalidPacket(PACKET_CONTENT_CLIENT_INFO_LIST); }
 
bool NetworkContentSocketHandler::Receive_CLIENT_INFO_ID(Packet *p) { return this->ReceiveInvalidPacket(PACKET_CONTENT_CLIENT_INFO_ID); }
 
bool NetworkContentSocketHandler::Receive_CLIENT_INFO_EXTID(Packet *p) { return this->ReceiveInvalidPacket(PACKET_CONTENT_CLIENT_INFO_EXTID); }
 
bool NetworkContentSocketHandler::Receive_CLIENT_INFO_EXTID_MD5(Packet *p) { return this->ReceiveInvalidPacket(PACKET_CONTENT_CLIENT_INFO_EXTID_MD5); }
 
bool NetworkContentSocketHandler::Receive_SERVER_INFO(Packet *p) { return this->ReceiveInvalidPacket(PACKET_CONTENT_SERVER_INFO); }
 
bool NetworkContentSocketHandler::Receive_CLIENT_CONTENT(Packet *p) { return this->ReceiveInvalidPacket(PACKET_CONTENT_CLIENT_CONTENT); }
 
bool NetworkContentSocketHandler::Receive_SERVER_CONTENT(Packet *p) { return this->ReceiveInvalidPacket(PACKET_CONTENT_SERVER_CONTENT); }
 
bool NetworkContentSocketHandler::Receive_CLIENT_INFO_LIST(Packet *) { return this->ReceiveInvalidPacket(PACKET_CONTENT_CLIENT_INFO_LIST); }
 
bool NetworkContentSocketHandler::Receive_CLIENT_INFO_ID(Packet *) { return this->ReceiveInvalidPacket(PACKET_CONTENT_CLIENT_INFO_ID); }
 
bool NetworkContentSocketHandler::Receive_CLIENT_INFO_EXTID(Packet *) { return this->ReceiveInvalidPacket(PACKET_CONTENT_CLIENT_INFO_EXTID); }
 
bool NetworkContentSocketHandler::Receive_CLIENT_INFO_EXTID_MD5(Packet *) { return this->ReceiveInvalidPacket(PACKET_CONTENT_CLIENT_INFO_EXTID_MD5); }
 
bool NetworkContentSocketHandler::Receive_SERVER_INFO(Packet *) { return this->ReceiveInvalidPacket(PACKET_CONTENT_SERVER_INFO); }
 
bool NetworkContentSocketHandler::Receive_CLIENT_CONTENT(Packet *) { return this->ReceiveInvalidPacket(PACKET_CONTENT_CLIENT_CONTENT); }
 
bool NetworkContentSocketHandler::Receive_SERVER_CONTENT(Packet *) { return this->ReceiveInvalidPacket(PACKET_CONTENT_SERVER_CONTENT); }
 

	
 
/**
 
 * Helper to get the subdirectory a #ContentInfo is located in.
src/network/core/tcp_coordinator.cpp
Show inline comments
 
@@ -87,20 +87,20 @@ bool NetworkCoordinatorSocketHandler::Re
 
	return false;
 
}
 

	
 
bool NetworkCoordinatorSocketHandler::Receive_GC_ERROR(Packet *p) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_GC_ERROR); }
 
bool NetworkCoordinatorSocketHandler::Receive_SERVER_REGISTER(Packet *p) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_SERVER_REGISTER); }
 
bool NetworkCoordinatorSocketHandler::Receive_GC_REGISTER_ACK(Packet *p) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_GC_REGISTER_ACK); }
 
bool NetworkCoordinatorSocketHandler::Receive_SERVER_UPDATE(Packet *p) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_SERVER_UPDATE); }
 
bool NetworkCoordinatorSocketHandler::Receive_CLIENT_LISTING(Packet *p) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_CLIENT_LISTING); }
 
bool NetworkCoordinatorSocketHandler::Receive_GC_LISTING(Packet *p) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_GC_LISTING); }
 
bool NetworkCoordinatorSocketHandler::Receive_CLIENT_CONNECT(Packet *p) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_CLIENT_CONNECT); }
 
bool NetworkCoordinatorSocketHandler::Receive_GC_CONNECTING(Packet *p) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_GC_CONNECTING); }
 
bool NetworkCoordinatorSocketHandler::Receive_SERCLI_CONNECT_FAILED(Packet *p) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_SERCLI_CONNECT_FAILED); }
 
bool NetworkCoordinatorSocketHandler::Receive_GC_CONNECT_FAILED(Packet *p) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_GC_CONNECT_FAILED); }
 
bool NetworkCoordinatorSocketHandler::Receive_CLIENT_CONNECTED(Packet *p) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_CLIENT_CONNECTED); }
 
bool NetworkCoordinatorSocketHandler::Receive_GC_DIRECT_CONNECT(Packet *p) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_GC_DIRECT_CONNECT); }
 
bool NetworkCoordinatorSocketHandler::Receive_GC_STUN_REQUEST(Packet *p) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_GC_STUN_REQUEST); }
 
bool NetworkCoordinatorSocketHandler::Receive_SERCLI_STUN_RESULT(Packet *p) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_SERCLI_STUN_RESULT); }
 
bool NetworkCoordinatorSocketHandler::Receive_GC_STUN_CONNECT(Packet *p) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_GC_STUN_CONNECT); }
 
bool NetworkCoordinatorSocketHandler::Receive_GC_NEWGRF_LOOKUP(Packet *p) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_GC_NEWGRF_LOOKUP); }
 
bool NetworkCoordinatorSocketHandler::Receive_GC_TURN_CONNECT(Packet *p) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_GC_TURN_CONNECT); }
 
bool NetworkCoordinatorSocketHandler::Receive_GC_ERROR(Packet *) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_GC_ERROR); }
 
bool NetworkCoordinatorSocketHandler::Receive_SERVER_REGISTER(Packet *) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_SERVER_REGISTER); }
 
bool NetworkCoordinatorSocketHandler::Receive_GC_REGISTER_ACK(Packet *) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_GC_REGISTER_ACK); }
 
bool NetworkCoordinatorSocketHandler::Receive_SERVER_UPDATE(Packet *) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_SERVER_UPDATE); }
 
bool NetworkCoordinatorSocketHandler::Receive_CLIENT_LISTING(Packet *) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_CLIENT_LISTING); }
 
bool NetworkCoordinatorSocketHandler::Receive_GC_LISTING(Packet *) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_GC_LISTING); }
 
bool NetworkCoordinatorSocketHandler::Receive_CLIENT_CONNECT(Packet *) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_CLIENT_CONNECT); }
 
bool NetworkCoordinatorSocketHandler::Receive_GC_CONNECTING(Packet *) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_GC_CONNECTING); }
 
bool NetworkCoordinatorSocketHandler::Receive_SERCLI_CONNECT_FAILED(Packet *) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_SERCLI_CONNECT_FAILED); }
 
bool NetworkCoordinatorSocketHandler::Receive_GC_CONNECT_FAILED(Packet *) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_GC_CONNECT_FAILED); }
 
bool NetworkCoordinatorSocketHandler::Receive_CLIENT_CONNECTED(Packet *) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_CLIENT_CONNECTED); }
 
bool NetworkCoordinatorSocketHandler::Receive_GC_DIRECT_CONNECT(Packet *) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_GC_DIRECT_CONNECT); }
 
bool NetworkCoordinatorSocketHandler::Receive_GC_STUN_REQUEST(Packet *) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_GC_STUN_REQUEST); }
 
bool NetworkCoordinatorSocketHandler::Receive_SERCLI_STUN_RESULT(Packet *) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_SERCLI_STUN_RESULT); }
 
bool NetworkCoordinatorSocketHandler::Receive_GC_STUN_CONNECT(Packet *) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_GC_STUN_CONNECT); }
 
bool NetworkCoordinatorSocketHandler::Receive_GC_NEWGRF_LOOKUP(Packet *) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_GC_NEWGRF_LOOKUP); }
 
bool NetworkCoordinatorSocketHandler::Receive_GC_TURN_CONNECT(Packet *) { return this->ReceiveInvalidPacket(PACKET_COORDINATOR_GC_TURN_CONNECT); }
src/network/core/tcp_game.cpp
Show inline comments
 
@@ -40,7 +40,7 @@ NetworkGameSocketHandler::NetworkGameSoc
 
 * For servers: close connection and that is it
 
 * @return the new status
 
 */
 
NetworkRecvStatus NetworkGameSocketHandler::CloseConnection(bool error)
 
NetworkRecvStatus NetworkGameSocketHandler::CloseConnection(bool)
 
{
 
	/* Clients drop back to the main menu */
 
	if (!_network_server && _networking) {
 
@@ -156,50 +156,50 @@ NetworkRecvStatus NetworkGameSocketHandl
 
	return NETWORK_RECV_STATUS_MALFORMED_PACKET;
 
}
 

	
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_FULL(Packet *p) { return this->ReceiveInvalidPacket(PACKET_SERVER_FULL); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_BANNED(Packet *p) { return this->ReceiveInvalidPacket(PACKET_SERVER_BANNED); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_JOIN(Packet *p) { return this->ReceiveInvalidPacket(PACKET_CLIENT_JOIN); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_ERROR(Packet *p) { return this->ReceiveInvalidPacket(PACKET_SERVER_ERROR); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_GAME_INFO(Packet *p) { return this->ReceiveInvalidPacket(PACKET_CLIENT_GAME_INFO); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_GAME_INFO(Packet *p) { return this->ReceiveInvalidPacket(PACKET_SERVER_GAME_INFO); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_CLIENT_INFO(Packet *p) { return this->ReceiveInvalidPacket(PACKET_SERVER_CLIENT_INFO); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_NEED_GAME_PASSWORD(Packet *p) { return this->ReceiveInvalidPacket(PACKET_SERVER_NEED_GAME_PASSWORD); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_NEED_COMPANY_PASSWORD(Packet *p) { return this->ReceiveInvalidPacket(PACKET_SERVER_NEED_COMPANY_PASSWORD); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_GAME_PASSWORD(Packet *p) { return this->ReceiveInvalidPacket(PACKET_CLIENT_GAME_PASSWORD); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_COMPANY_PASSWORD(Packet *p) { return this->ReceiveInvalidPacket(PACKET_CLIENT_COMPANY_PASSWORD); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_WELCOME(Packet *p) { return this->ReceiveInvalidPacket(PACKET_SERVER_WELCOME); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_GETMAP(Packet *p) { return this->ReceiveInvalidPacket(PACKET_CLIENT_GETMAP); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_WAIT(Packet *p) { return this->ReceiveInvalidPacket(PACKET_SERVER_WAIT); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_MAP_BEGIN(Packet *p) { return this->ReceiveInvalidPacket(PACKET_SERVER_MAP_BEGIN); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_MAP_SIZE(Packet *p) { return this->ReceiveInvalidPacket(PACKET_SERVER_MAP_SIZE); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_MAP_DATA(Packet *p) { return this->ReceiveInvalidPacket(PACKET_SERVER_MAP_DATA); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_MAP_DONE(Packet *p) { return this->ReceiveInvalidPacket(PACKET_SERVER_MAP_DONE); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_MAP_OK(Packet *p) { return this->ReceiveInvalidPacket(PACKET_CLIENT_MAP_OK); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_JOIN(Packet *p) { return this->ReceiveInvalidPacket(PACKET_SERVER_JOIN); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_FRAME(Packet *p) { return this->ReceiveInvalidPacket(PACKET_SERVER_FRAME); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_SYNC(Packet *p) { return this->ReceiveInvalidPacket(PACKET_SERVER_SYNC); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_ACK(Packet *p) { return this->ReceiveInvalidPacket(PACKET_CLIENT_ACK); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_COMMAND(Packet *p) { return this->ReceiveInvalidPacket(PACKET_CLIENT_COMMAND); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_COMMAND(Packet *p) { return this->ReceiveInvalidPacket(PACKET_SERVER_COMMAND); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_CHAT(Packet *p) { return this->ReceiveInvalidPacket(PACKET_CLIENT_CHAT); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_CHAT(Packet *p) { return this->ReceiveInvalidPacket(PACKET_SERVER_CHAT); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_EXTERNAL_CHAT(Packet *p) { return this->ReceiveInvalidPacket(PACKET_SERVER_EXTERNAL_CHAT); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_SET_PASSWORD(Packet *p) { return this->ReceiveInvalidPacket(PACKET_CLIENT_SET_PASSWORD); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_SET_NAME(Packet *p) { return this->ReceiveInvalidPacket(PACKET_CLIENT_SET_NAME); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_QUIT(Packet *p) { return this->ReceiveInvalidPacket(PACKET_CLIENT_QUIT); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_ERROR(Packet *p) { return this->ReceiveInvalidPacket(PACKET_CLIENT_ERROR); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_QUIT(Packet *p) { return this->ReceiveInvalidPacket(PACKET_SERVER_QUIT); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_ERROR_QUIT(Packet *p) { return this->ReceiveInvalidPacket(PACKET_SERVER_ERROR_QUIT); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_SHUTDOWN(Packet *p) { return this->ReceiveInvalidPacket(PACKET_SERVER_SHUTDOWN); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_NEWGAME(Packet *p) { return this->ReceiveInvalidPacket(PACKET_SERVER_NEWGAME); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_RCON(Packet *p) { return this->ReceiveInvalidPacket(PACKET_SERVER_RCON); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_RCON(Packet *p) { return this->ReceiveInvalidPacket(PACKET_CLIENT_RCON); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_CHECK_NEWGRFS(Packet *p) { return this->ReceiveInvalidPacket(PACKET_SERVER_CHECK_NEWGRFS); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_NEWGRFS_CHECKED(Packet *p) { return this->ReceiveInvalidPacket(PACKET_CLIENT_NEWGRFS_CHECKED); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_MOVE(Packet *p) { return this->ReceiveInvalidPacket(PACKET_SERVER_MOVE); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_MOVE(Packet *p) { return this->ReceiveInvalidPacket(PACKET_CLIENT_MOVE); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_COMPANY_UPDATE(Packet *p) { return this->ReceiveInvalidPacket(PACKET_SERVER_COMPANY_UPDATE); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_CONFIG_UPDATE(Packet *p) { return this->ReceiveInvalidPacket(PACKET_SERVER_CONFIG_UPDATE); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_FULL(Packet *) { return this->ReceiveInvalidPacket(PACKET_SERVER_FULL); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_BANNED(Packet *) { return this->ReceiveInvalidPacket(PACKET_SERVER_BANNED); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_JOIN(Packet *) { return this->ReceiveInvalidPacket(PACKET_CLIENT_JOIN); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_ERROR(Packet *) { return this->ReceiveInvalidPacket(PACKET_SERVER_ERROR); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_GAME_INFO(Packet *) { return this->ReceiveInvalidPacket(PACKET_CLIENT_GAME_INFO); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_GAME_INFO(Packet *) { return this->ReceiveInvalidPacket(PACKET_SERVER_GAME_INFO); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_CLIENT_INFO(Packet *) { return this->ReceiveInvalidPacket(PACKET_SERVER_CLIENT_INFO); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_NEED_GAME_PASSWORD(Packet *) { return this->ReceiveInvalidPacket(PACKET_SERVER_NEED_GAME_PASSWORD); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_NEED_COMPANY_PASSWORD(Packet *) { return this->ReceiveInvalidPacket(PACKET_SERVER_NEED_COMPANY_PASSWORD); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_GAME_PASSWORD(Packet *) { return this->ReceiveInvalidPacket(PACKET_CLIENT_GAME_PASSWORD); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_COMPANY_PASSWORD(Packet *) { return this->ReceiveInvalidPacket(PACKET_CLIENT_COMPANY_PASSWORD); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_WELCOME(Packet *) { return this->ReceiveInvalidPacket(PACKET_SERVER_WELCOME); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_GETMAP(Packet *) { return this->ReceiveInvalidPacket(PACKET_CLIENT_GETMAP); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_WAIT(Packet *) { return this->ReceiveInvalidPacket(PACKET_SERVER_WAIT); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_MAP_BEGIN(Packet *) { return this->ReceiveInvalidPacket(PACKET_SERVER_MAP_BEGIN); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_MAP_SIZE(Packet *) { return this->ReceiveInvalidPacket(PACKET_SERVER_MAP_SIZE); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_MAP_DATA(Packet *) { return this->ReceiveInvalidPacket(PACKET_SERVER_MAP_DATA); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_MAP_DONE(Packet *) { return this->ReceiveInvalidPacket(PACKET_SERVER_MAP_DONE); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_MAP_OK(Packet *) { return this->ReceiveInvalidPacket(PACKET_CLIENT_MAP_OK); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_JOIN(Packet *) { return this->ReceiveInvalidPacket(PACKET_SERVER_JOIN); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_FRAME(Packet *) { return this->ReceiveInvalidPacket(PACKET_SERVER_FRAME); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_SYNC(Packet *) { return this->ReceiveInvalidPacket(PACKET_SERVER_SYNC); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_ACK(Packet *) { return this->ReceiveInvalidPacket(PACKET_CLIENT_ACK); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_COMMAND(Packet *) { return this->ReceiveInvalidPacket(PACKET_CLIENT_COMMAND); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_COMMAND(Packet *) { return this->ReceiveInvalidPacket(PACKET_SERVER_COMMAND); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_CHAT(Packet *) { return this->ReceiveInvalidPacket(PACKET_CLIENT_CHAT); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_CHAT(Packet *) { return this->ReceiveInvalidPacket(PACKET_SERVER_CHAT); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_EXTERNAL_CHAT(Packet *) { return this->ReceiveInvalidPacket(PACKET_SERVER_EXTERNAL_CHAT); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_SET_PASSWORD(Packet *) { return this->ReceiveInvalidPacket(PACKET_CLIENT_SET_PASSWORD); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_SET_NAME(Packet *) { return this->ReceiveInvalidPacket(PACKET_CLIENT_SET_NAME); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_QUIT(Packet *) { return this->ReceiveInvalidPacket(PACKET_CLIENT_QUIT); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_ERROR(Packet *) { return this->ReceiveInvalidPacket(PACKET_CLIENT_ERROR); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_QUIT(Packet *) { return this->ReceiveInvalidPacket(PACKET_SERVER_QUIT); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_ERROR_QUIT(Packet *) { return this->ReceiveInvalidPacket(PACKET_SERVER_ERROR_QUIT); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_SHUTDOWN(Packet *) { return this->ReceiveInvalidPacket(PACKET_SERVER_SHUTDOWN); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_NEWGAME(Packet *) { return this->ReceiveInvalidPacket(PACKET_SERVER_NEWGAME); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_RCON(Packet *) { return this->ReceiveInvalidPacket(PACKET_SERVER_RCON); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_RCON(Packet *) { return this->ReceiveInvalidPacket(PACKET_CLIENT_RCON); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_CHECK_NEWGRFS(Packet *) { return this->ReceiveInvalidPacket(PACKET_SERVER_CHECK_NEWGRFS); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_NEWGRFS_CHECKED(Packet *) { return this->ReceiveInvalidPacket(PACKET_CLIENT_NEWGRFS_CHECKED); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_MOVE(Packet *) { return this->ReceiveInvalidPacket(PACKET_SERVER_MOVE); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_CLIENT_MOVE(Packet *) { return this->ReceiveInvalidPacket(PACKET_CLIENT_MOVE); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_COMPANY_UPDATE(Packet *) { return this->ReceiveInvalidPacket(PACKET_SERVER_COMPANY_UPDATE); }
 
NetworkRecvStatus NetworkGameSocketHandler::Receive_SERVER_CONFIG_UPDATE(Packet *) { return this->ReceiveInvalidPacket(PACKET_SERVER_CONFIG_UPDATE); }
 

	
 
void NetworkGameSocketHandler::DeferDeletion()
 
{
src/network/core/tcp_stun.cpp
Show inline comments
 
@@ -26,4 +26,4 @@ bool NetworkStunSocketHandler::ReceiveIn
 
	return false;
 
}
 

	
 
bool NetworkStunSocketHandler::Receive_SERCLI_STUN(Packet *p) { return this->ReceiveInvalidPacket(PACKET_STUN_SERCLI_STUN); }
 
bool NetworkStunSocketHandler::Receive_SERCLI_STUN(Packet *) { return this->ReceiveInvalidPacket(PACKET_STUN_SERCLI_STUN); }
src/network/core/tcp_turn.cpp
Show inline comments
 
@@ -66,6 +66,6 @@ bool NetworkTurnSocketHandler::ReceiveIn
 
	return false;
 
}
 

	
 
bool NetworkTurnSocketHandler::Receive_TURN_ERROR(Packet *p) { return this->ReceiveInvalidPacket(PACKET_TURN_TURN_ERROR); }
 
bool NetworkTurnSocketHandler::Receive_SERCLI_CONNECT(Packet *p) { return this->ReceiveInvalidPacket(PACKET_TURN_SERCLI_CONNECT); }
 
bool NetworkTurnSocketHandler::Receive_TURN_CONNECTED(Packet *p) { return this->ReceiveInvalidPacket(PACKET_TURN_TURN_CONNECTED); }
 
bool NetworkTurnSocketHandler::Receive_TURN_ERROR(Packet *) { return this->ReceiveInvalidPacket(PACKET_TURN_TURN_ERROR); }
 
bool NetworkTurnSocketHandler::Receive_SERCLI_CONNECT(Packet *) { return this->ReceiveInvalidPacket(PACKET_TURN_SERCLI_CONNECT); }
 
bool NetworkTurnSocketHandler::Receive_TURN_CONNECTED(Packet *) { return this->ReceiveInvalidPacket(PACKET_TURN_TURN_CONNECTED); }
src/network/core/udp.cpp
Show inline comments
 
@@ -183,5 +183,5 @@ void NetworkUDPSocketHandler::ReceiveInv
 
	Debug(net, 0, "[udp] Received packet type {} on wrong port from {}", type, client_addr->GetAddressAsString());
 
}
 

	
 
void NetworkUDPSocketHandler::Receive_CLIENT_FIND_SERVER(Packet *p, NetworkAddress *client_addr) { this->ReceiveInvalidPacket(PACKET_UDP_CLIENT_FIND_SERVER, client_addr); }
 
void NetworkUDPSocketHandler::Receive_SERVER_RESPONSE(Packet *p, NetworkAddress *client_addr) { this->ReceiveInvalidPacket(PACKET_UDP_SERVER_RESPONSE, client_addr); }
 
void NetworkUDPSocketHandler::Receive_CLIENT_FIND_SERVER(Packet *, NetworkAddress *client_addr) { this->ReceiveInvalidPacket(PACKET_UDP_CLIENT_FIND_SERVER, client_addr); }
 
void NetworkUDPSocketHandler::Receive_SERVER_RESPONSE(Packet *, NetworkAddress *client_addr) { this->ReceiveInvalidPacket(PACKET_UDP_SERVER_RESPONSE, client_addr); }
src/network/network_admin.cpp
Show inline comments
 
@@ -654,7 +654,7 @@ NetworkRecvStatus ServerNetworkAdminSock
 
	return this->SendProtocol();
 
}
 

	
 
NetworkRecvStatus ServerNetworkAdminSocketHandler::Receive_ADMIN_QUIT(Packet *p)
 
NetworkRecvStatus ServerNetworkAdminSocketHandler::Receive_ADMIN_QUIT(Packet *)
 
{
 
	/* The admin is leaving nothing else to do */
 
	return this->CloseConnection();
src/network/network_chat_gui.cpp
Show inline comments
 
@@ -308,7 +308,7 @@ struct NetworkChatWindow : public Window
 
		this->Window::Close();
 
	}
 

	
 
	void FindWindowPlacementAndResize(int def_width, int def_height) override
 
	void FindWindowPlacementAndResize([[maybe_unused]] int def_width, [[maybe_unused]] int def_height) override
 
	{
 
		Window::FindWindowPlacementAndResize(_toolbar_width, def_height);
 
	}
 
@@ -436,7 +436,7 @@ struct NetworkChatWindow : public Window
 
		}
 
	}
 

	
 
	Point OnInitialPosition(int16_t sm_width, int16_t sm_height, int window_number) override
 
	Point OnInitialPosition([[maybe_unused]] int16_t sm_width, [[maybe_unused]] int16_t sm_height, [[maybe_unused]] int window_number) override
 
	{
 
		Point pt = { 0, _screen.height - sm_height - FindWindowById(WC_STATUS_BAR, 0)->height };
 
		return pt;
 
@@ -451,7 +451,7 @@ struct NetworkChatWindow : public Window
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_NC_SENDBUTTON: /* Send */
 
@@ -464,7 +464,7 @@ struct NetworkChatWindow : public Window
 
		}
 
	}
 

	
 
	EventState OnKeyPress(char32_t key, uint16_t keycode) override
 
	EventState OnKeyPress([[maybe_unused]] char32_t key, uint16_t keycode) override
 
	{
 
		EventState state = ES_NOT_HANDLED;
 
		if (keycode == WKC_TAB) {
 
@@ -484,7 +484,7 @@ struct NetworkChatWindow : public Window
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (data == this->dest) this->Close();
 
	}
src/network/network_client.cpp
Show inline comments
 
@@ -534,7 +534,7 @@ bool ClientNetworkGameSocketHandler::IsC
 

	
 
extern bool SafeLoad(const std::string &filename, SaveLoadOperation fop, DetailedFileType dft, GameMode newgm, Subdirectory subdir, struct LoadFilter *lf = nullptr);
 

	
 
NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_FULL(Packet *p)
 
NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_FULL(Packet *)
 
{
 
	/* We try to join a server which is full */
 
	ShowErrorMessage(STR_NETWORK_ERROR_SERVER_FULL, INVALID_STRING_ID, WL_CRITICAL);
 
@@ -542,7 +542,7 @@ NetworkRecvStatus ClientNetworkGameSocke
 
	return NETWORK_RECV_STATUS_SERVER_FULL;
 
}
 

	
 
NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_BANNED(Packet *p)
 
NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_BANNED(Packet *)
 
{
 
	/* We try to join a server where we are banned */
 
	ShowErrorMessage(STR_NETWORK_ERROR_SERVER_BANNED, INVALID_STRING_ID, WL_CRITICAL);
 
@@ -685,7 +685,7 @@ NetworkRecvStatus ClientNetworkGameSocke
 
	return ret;
 
}
 

	
 
NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_NEED_GAME_PASSWORD(Packet *p)
 
NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_NEED_GAME_PASSWORD(Packet *)
 
{
 
	if (this->status < STATUS_JOIN || this->status >= STATUS_AUTH_GAME) return NETWORK_RECV_STATUS_MALFORMED_PACKET;
 
	this->status = STATUS_AUTH_GAME;
 
@@ -790,7 +790,7 @@ NetworkRecvStatus ClientNetworkGameSocke
 
	return NETWORK_RECV_STATUS_OKAY;
 
}
 

	
 
NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_MAP_DONE(Packet *p)
 
NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_MAP_DONE(Packet *)
 
{
 
	if (this->status != STATUS_MAP) return NETWORK_RECV_STATUS_MALFORMED_PACKET;
 
	if (this->savegame == nullptr) return NETWORK_RECV_STATUS_MALFORMED_PACKET;
 
@@ -1035,7 +1035,7 @@ NetworkRecvStatus ClientNetworkGameSocke
 
	return NETWORK_RECV_STATUS_OKAY;
 
}
 

	
 
NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_SHUTDOWN(Packet *p)
 
NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_SHUTDOWN(Packet *)
 
{
 
	/* Only when we're trying to join we really
 
	 * care about the server shutting down. */
 
@@ -1048,7 +1048,7 @@ NetworkRecvStatus ClientNetworkGameSocke
 
	return NETWORK_RECV_STATUS_SERVER_ERROR;
 
}
 

	
 
NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_NEWGAME(Packet *p)
 
NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_NEWGAME(Packet *)
 
{
 
	/* Only when we're trying to join we really
 
	 * care about the server shutting down. */
src/network/network_content.cpp
Show inline comments
 
@@ -792,7 +792,7 @@ void ClientNetworkContentSocketHandler::
 
/**
 
 * Disconnect from the content server.
 
 */
 
NetworkRecvStatus ClientNetworkContentSocketHandler::CloseConnection(bool error)
 
NetworkRecvStatus ClientNetworkContentSocketHandler::CloseConnection(bool)
 
{
 
	this->isCancelled = true;
 
	NetworkContentSocketHandler::CloseConnection();
src/network/network_content.h
Show inline comments
 
@@ -31,7 +31,7 @@ struct ContentCallback {
 
	 * Callback for when the connection has finished
 
	 * @param success whether the connection was made or that we failed to make it
 
	 */
 
	virtual void OnConnect(bool success) {}
 
	virtual void OnConnect([[maybe_unused]] bool success) {}
 

	
 
	/**
 
	 * Callback for when the connection got disconnected.
 
@@ -42,20 +42,20 @@ struct ContentCallback {
 
	 * We received a content info.
 
	 * @param ci the content info
 
	 */
 
	virtual void OnReceiveContentInfo(const ContentInfo *ci) {}
 
	virtual void OnReceiveContentInfo([[maybe_unused]] const ContentInfo *ci) {}
 

	
 
	/**
 
	 * We have progress in the download of a file
 
	 * @param ci the content info of the file
 
	 * @param bytes the number of bytes downloaded since the previous call
 
	 */
 
	virtual void OnDownloadProgress(const ContentInfo *ci, int bytes) {}
 
	virtual void OnDownloadProgress([[maybe_unused]] const ContentInfo *ci, [[maybe_unused]] int bytes) {}
 

	
 
	/**
 
	 * We have finished downloading a file
 
	 * @param cid the ContentID of the downloaded file
 
	 */
 
	virtual void OnDownloadComplete(ContentID cid) {}
 
	virtual void OnDownloadComplete([[maybe_unused]] ContentID cid) {}
 

	
 
	/** Silentium */
 
	virtual ~ContentCallback() = default;
src/network/network_content_gui.cpp
Show inline comments
 
@@ -114,7 +114,7 @@ void BaseNetworkContentDownloadStatusWin
 
	this->Window::Close();
 
}
 

	
 
void BaseNetworkContentDownloadStatusWindow::UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
void BaseNetworkContentDownloadStatusWindow::UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize)
 
{
 
	switch (widget) {
 
		case WID_NCDS_PROGRESS_BAR:
 
@@ -285,7 +285,7 @@ public:
 
		this->BaseNetworkContentDownloadStatusWindow::Close();
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		if (widget == WID_NCDS_CANCELOK) {
 
			if (this->downloaded_bytes != this->total_bytes) {
 
@@ -581,7 +581,7 @@ public:
 
		this->checkbox_size = maxdim(maxdim(GetSpriteSize(SPR_BOX_EMPTY), GetSpriteSize(SPR_BOX_CHECKED)), GetSpriteSize(SPR_BLOT));
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_NCL_CHECKBOX:
 
@@ -788,7 +788,7 @@ public:
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		if (widget >= WID_NCL_TEXTFILE && widget < WID_NCL_TEXTFILE + TFT_CONTENT_END) {
 
			if (this->selected == nullptr || this->selected->state != ContentInfo::ALREADY_HERE) return;
 
@@ -873,7 +873,7 @@ public:
 
		}
 
	}
 

	
 
	EventState OnKeyPress(char32_t key, uint16_t keycode) override
 
	EventState OnKeyPress([[maybe_unused]] char32_t key, uint16_t keycode) override
 
	{
 
		if (this->vscroll->UpdateListPositionOnKeyPress(this->list_pos, keycode) == ES_NOT_HANDLED) {
 
			switch (keycode) {
 
@@ -943,7 +943,7 @@ public:
 
		this->InvalidateData(0, false);
 
	}
 

	
 
	void OnDownloadComplete(ContentID cid) override
 
	void OnDownloadComplete(ContentID) override
 
	{
 
		this->content.ForceResort();
 
		this->InvalidateData();
 
@@ -965,7 +965,7 @@ public:
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 
		if (this->content.NeedRebuild()) this->BuildContentList();
src/network/network_content_gui.h
Show inline comments
 
@@ -33,7 +33,7 @@ public:
 
	BaseNetworkContentDownloadStatusWindow(WindowDesc *desc);
 

	
 
	void Close() override;
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override;
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override;
 
	void DrawWidget(const Rect &r, int widget) const override;
 
	void OnDownloadProgress(const ContentInfo *ci, int bytes) override;
 
};
src/network/network_gui.cpp
Show inline comments
 
@@ -515,7 +515,7 @@ public:
 
		this->flag_offset = this->blot_offset + ScaleGUITrad(2) + GetSpriteSize(SPR_BLOT).width;
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_NG_MATRIX:
 
@@ -720,7 +720,7 @@ public:
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_NG_CANCEL: // Cancel button
 
@@ -818,13 +818,13 @@ public:
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		this->servers.ForceRebuild();
 
		this->SetDirty();
 
	}
 

	
 
	EventState OnKeyPress(char32_t key, uint16_t keycode) override
 
	EventState OnKeyPress([[maybe_unused]] char32_t key, uint16_t keycode) override
 
	{
 
		EventState state = ES_NOT_HANDLED;
 

	
 
@@ -888,7 +888,7 @@ public:
 
	}
 

	
 
	/** Refresh the online servers on a regular interval. */
 
	IntervalTimer<TimerWindow> refresh_interval = {std::chrono::seconds(30), [this](uint count) {
 
	IntervalTimer<TimerWindow> refresh_interval = {std::chrono::seconds(30), [this](uint) {
 
		if (!this->searched_internet) return;
 

	
 
		_network_coordinator_client.GetListing();
 
@@ -1058,7 +1058,7 @@ struct NetworkStartServerWindow : public
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_NSS_CONNTYPE_BTN:
 
@@ -1078,7 +1078,7 @@ struct NetworkStartServerWindow : public
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_NSS_CANCEL: // Cancel button
 
@@ -1369,30 +1369,27 @@ enum DropDownAdmin {
 

	
 
/**
 
 * Callback function for admin command to kick client.
 
 * @param w The window which initiated the confirmation dialog.
 
 * @param confirmed Iff the user pressed Yes.
 
 */
 
static void AdminClientKickCallback(Window *w, bool confirmed)
 
static void AdminClientKickCallback(Window *, bool confirmed)
 
{
 
	if (confirmed) NetworkServerKickClient(_admin_client_id, {});
 
}
 

	
 
/**
 
 * Callback function for admin command to ban client.
 
 * @param w The window which initiated the confirmation dialog.
 
 * @param confirmed Iff the user pressed Yes.
 
 */
 
static void AdminClientBanCallback(Window *w, bool confirmed)
 
static void AdminClientBanCallback(Window *, bool confirmed)
 
{
 
	if (confirmed) NetworkServerKickOrBanIP(_admin_client_id, true, {});
 
}
 

	
 
/**
 
 * Callback function for admin command to reset company.
 
 * @param w The window which initiated the confirmation dialog.
 
 * @param confirmed Iff the user pressed Yes.
 
 */
 
static void AdminCompanyResetCallback(Window *w, bool confirmed)
 
static void AdminCompanyResetCallback(Window *, bool confirmed)
 
{
 
	if (confirmed) {
 
		if (NetworkCompanyHasClients(_admin_company_id)) return;
 
@@ -1402,10 +1399,9 @@ static void AdminCompanyResetCallback(Wi
 

	
 
/**
 
 * Callback function for admin command to unlock company.
 
 * @param w The window which initiated the confirmation dialog.
 
 * @param confirmed Iff the user pressed Yes.
 
 */
 
static void AdminCompanyUnlockCallback(Window *w, bool confirmed)
 
static void AdminCompanyUnlockCallback(Window *, bool confirmed)
 
{
 
	if (confirmed) NetworkServerSetCompanyPassword(_admin_company_id, "", false);
 
}
 
@@ -1500,7 +1496,7 @@ private:
 
	 * @param pt The point where this button was clicked.
 
	 * @param company_id The company this button was assigned to.
 
	 */
 
	static void OnClickCompanyChat(NetworkClientListWindow *w, Point pt, CompanyID company_id)
 
	static void OnClickCompanyChat([[maybe_unused]] NetworkClientListWindow *w, [[maybe_unused]] Point pt, CompanyID company_id)
 
	{
 
		ShowNetworkChatQueryWindow(DESTTYPE_TEAM, company_id);
 
	}
 
@@ -1511,7 +1507,7 @@ private:
 
	 * @param pt The point where this button was clicked.
 
	 * @param company_id The company this button was assigned to.
 
	 */
 
	static void OnClickCompanyJoin(NetworkClientListWindow *w, Point pt, CompanyID company_id)
 
	static void OnClickCompanyJoin([[maybe_unused]] NetworkClientListWindow *w, [[maybe_unused]] Point pt, CompanyID company_id)
 
	{
 
		if (_network_server) {
 
			NetworkServerDoMove(CLIENT_ID_SERVER, company_id);
 
@@ -1529,9 +1525,8 @@ private:
 
	 * Crete new company button is clicked.
 
	 * @param w The instance of this window.
 
	 * @param pt The point where this button was clicked.
 
	 * @param company_id The company this button was assigned to.
 
	 */
 
	static void OnClickCompanyNew(NetworkClientListWindow *w, Point pt, CompanyID company_id)
 
	static void OnClickCompanyNew([[maybe_unused]] NetworkClientListWindow *w, [[maybe_unused]] Point pt, CompanyID)
 
	{
 
		if (_network_server) {
 
			Command<CMD_COMPANY_CTRL>::Post(CCA_NEW, INVALID_COMPANY, CRR_NONE, _network_own_client_id);
 
@@ -1546,7 +1541,7 @@ private:
 
	 * @param pt The point where this button was clicked.
 
	 * @param client_id The client this button was assigned to.
 
	 */
 
	static void OnClickClientAdmin(NetworkClientListWindow *w, Point pt, ClientID client_id)
 
	static void OnClickClientAdmin([[maybe_unused]] NetworkClientListWindow *w, [[maybe_unused]] Point pt, ClientID client_id)
 
	{
 
		DropDownList list;
 
		list.emplace_back(new DropDownListStringItem(STR_NETWORK_CLIENT_LIST_ADMIN_CLIENT_KICK, DD_CLIENT_ADMIN_KICK, false));
 
@@ -1568,7 +1563,7 @@ private:
 
	 * @param pt The point where this button was clicked.
 
	 * @param company_id The company this button was assigned to.
 
	 */
 
	static void OnClickCompanyAdmin(NetworkClientListWindow *w, Point pt, CompanyID company_id)
 
	static void OnClickCompanyAdmin([[maybe_unused]] NetworkClientListWindow *w, [[maybe_unused]] Point pt, CompanyID company_id)
 
	{
 
		DropDownList list;
 
		list.emplace_back(new DropDownListStringItem(STR_NETWORK_CLIENT_LIST_ADMIN_COMPANY_RESET, DD_COMPANY_ADMIN_RESET, NetworkCompanyHasClients(company_id)));
 
@@ -1589,7 +1584,7 @@ private:
 
	 * @param pt The point where this button was clicked.
 
	 * @param client_id The client this button was assigned to.
 
	 */
 
	static void OnClickClientChat(NetworkClientListWindow *w, Point pt, ClientID client_id)
 
	static void OnClickClientChat([[maybe_unused]] NetworkClientListWindow *w, [[maybe_unused]] Point pt, ClientID client_id)
 
	{
 
		ShowNetworkChatQueryWindow(DESTTYPE_CLIENT, client_id);
 
	}
 
@@ -1717,7 +1712,7 @@ public:
 
		RebuildList();
 
	}
 

	
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		this->RebuildList();
 

	
 
@@ -1726,7 +1721,7 @@ public:
 
		this->SetWidgetDisabledState(WID_CL_SERVER_NAME_EDIT, !_network_server);
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_CL_SERVER_VISIBILITY:
 
@@ -1789,7 +1784,7 @@ public:
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_CL_SERVER_NAME_EDIT:
 
@@ -1823,7 +1818,7 @@ public:
 
		}
 
	}
 

	
 
	bool OnTooltip(Point pt, int widget, TooltipCloseCondition close_cond) override
 
	bool OnTooltip([[maybe_unused]] Point pt, int widget, TooltipCloseCondition close_cond) override
 
	{
 
		switch (widget) {
 
			case WID_CL_MATRIX: {
 
@@ -2116,7 +2111,7 @@ public:
 
		}
 
	}
 

	
 
	void OnMouseOver(Point pt, int widget) override
 
	void OnMouseOver([[maybe_unused]] Point pt, int widget) override
 
	{
 
		if (widget != WID_CL_MATRIX) {
 
			if (this->hover_index != -1) {
 
@@ -2203,7 +2198,7 @@ struct NetworkJoinStatusWindow : Window 
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_NJS_PROGRESS_BAR:
 
@@ -2229,7 +2224,7 @@ struct NetworkJoinStatusWindow : Window 
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		if (widget == WID_NJS_CANCELOK) { // Disconnect button
 
			NetworkDisconnect();
 
@@ -2318,7 +2313,7 @@ struct NetworkCompanyPasswordWindow : pu
 
		this->ReInit();
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		if (widget == WID_NCP_WARNING) {
 
			*size = this->warning_size;
 
@@ -2342,7 +2337,7 @@ struct NetworkCompanyPasswordWindow : pu
 
		NetworkChangeCompanyPassword(_local_company, this->password_editbox.text.buf);
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_NCP_OK:
 
@@ -2418,7 +2413,7 @@ struct NetworkAskRelayWindow : public Wi
 
		this->InitNested(0);
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		if (widget == WID_NAR_TEXT) {
 
			*size = GetStringBoundingBox(STR_NETWORK_ASK_RELAY_TEXT);
 
@@ -2434,7 +2429,7 @@ struct NetworkAskRelayWindow : public Wi
 
		}
 
	}
 

	
 
	void FindWindowPlacementAndResize(int def_width, int def_height) override
 
	void FindWindowPlacementAndResize([[maybe_unused]] int def_width, [[maybe_unused]] int def_height) override
 
	{
 
		/* Position query window over the calling window, ensuring it's within screen bounds. */
 
		this->left = Clamp(parent->left + (parent->width / 2) - (this->width / 2), 0, _screen.width - this->width);
 
@@ -2452,7 +2447,7 @@ struct NetworkAskRelayWindow : public Wi
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_NAR_NO:
 
@@ -2521,7 +2516,7 @@ struct NetworkAskSurveyWindow : public W
 
		this->InitNested(0);
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		if (widget == WID_NAS_TEXT) {
 
			*size = GetStringBoundingBox(STR_NETWORK_ASK_SURVEY_TEXT);
 
@@ -2537,7 +2532,7 @@ struct NetworkAskSurveyWindow : public W
 
		}
 
	}
 

	
 
	void FindWindowPlacementAndResize(int def_width, int def_height) override
 
	void FindWindowPlacementAndResize([[maybe_unused]] int def_width, [[maybe_unused]] int def_height) override
 
	{
 
		/* Position query window over the calling window, ensuring it's within screen bounds. */
 
		this->left = Clamp(parent->left + (parent->width / 2) - (this->width / 2), 0, _screen.width - this->width);
 
@@ -2545,7 +2540,7 @@ struct NetworkAskSurveyWindow : public W
 
		this->SetDirty();
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_NAS_PREVIEW:
src/network/network_query.cpp
Show inline comments
 
@@ -75,7 +75,7 @@ NetworkRecvStatus QueryNetworkGameSocket
 
	return NETWORK_RECV_STATUS_OKAY;
 
}
 

	
 
NetworkRecvStatus QueryNetworkGameSocketHandler::Receive_SERVER_FULL(Packet *p)
 
NetworkRecvStatus QueryNetworkGameSocketHandler::Receive_SERVER_FULL(Packet *)
 
{
 
	NetworkGameList *item = NetworkGameListAddItem(this->connection_string);
 
	item->status = NGLS_FULL;
 
@@ -86,7 +86,7 @@ NetworkRecvStatus QueryNetworkGameSocket
 
	return NETWORK_RECV_STATUS_CLOSE_QUERY;
 
}
 

	
 
NetworkRecvStatus QueryNetworkGameSocketHandler::Receive_SERVER_BANNED(Packet *p)
 
NetworkRecvStatus QueryNetworkGameSocketHandler::Receive_SERVER_BANNED(Packet *)
 
{
 
	NetworkGameList *item = NetworkGameListAddItem(this->connection_string);
 
	item->status = NGLS_BANNED;
src/network/network_server.cpp
Show inline comments
 
@@ -799,12 +799,12 @@ NetworkRecvStatus ServerNetworkGameSocke
 
 *   DEF_SERVER_RECEIVE_COMMAND has parameter: NetworkClientSocket *cs, Packet *p
 
 ************/
 

	
 
NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_GAME_INFO(Packet *p)
 
NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_GAME_INFO(Packet *)
 
{
 
	return this->SendGameInfo();
 
}
 

	
 
NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_NEWGRFS_CHECKED(Packet *p)
 
NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_NEWGRFS_CHECKED(Packet *)
 
{
 
	if (this->status != STATUS_NEWGRFS_CHECK) {
 
		/* Illegal call, return error and ignore the packet */
 
@@ -945,7 +945,7 @@ NetworkRecvStatus ServerNetworkGameSocke
 
	return this->SendWelcome();
 
}
 

	
 
NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_GETMAP(Packet *p)
 
NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_GETMAP(Packet *)
 
{
 
	/* The client was never joined.. so this is impossible, right?
 
	 *  Ignore the packet, give the client a warning, and close the connection */
 
@@ -966,7 +966,7 @@ NetworkRecvStatus ServerNetworkGameSocke
 
	return this->SendMap();
 
}
 

	
 
NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_MAP_OK(Packet *p)
 
NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_MAP_OK(Packet *)
 
{
 
	/* Client has the map, now start syncing */
 
	if (this->status == STATUS_DONE_MAP && !this->HasClientQuit()) {
 
@@ -1107,7 +1107,7 @@ NetworkRecvStatus ServerNetworkGameSocke
 
	return this->CloseConnection(NETWORK_RECV_STATUS_CLIENT_QUIT);
 
}
 

	
 
NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_QUIT(Packet *p)
 
NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_QUIT(Packet *)
 
{
 
	/* The client was never joined.. thank the client for the packet, but ignore it */
 
	if (this->status < STATUS_DONE_MAP || this->HasClientQuit()) {
src/network/network_survey.cpp
Show inline comments
 
@@ -110,7 +110,7 @@ void NetworkSurveyHandler::OnFailure()
 
	this->loaded.notify_all();
 
}
 

	
 
void NetworkSurveyHandler::OnReceiveData(const char *data, size_t length)
 
void NetworkSurveyHandler::OnReceiveData(const char *data, size_t)
 
{
 
	if (data == nullptr) {
 
		Debug(net, 1, "Survey: survey results sent");
src/network/network_turn.cpp
Show inline comments
 
@@ -45,7 +45,7 @@ public:
 
	}
 
};
 

	
 
bool ClientNetworkTurnSocketHandler::Receive_TURN_ERROR(Packet *p)
 
bool ClientNetworkTurnSocketHandler::Receive_TURN_ERROR(Packet *)
 
{
 
	this->ConnectFailure();
 

	
src/network/network_udp.cpp
Show inline comments
 
@@ -73,7 +73,7 @@ public:
 
	virtual ~ServerNetworkUDPSocketHandler() = default;
 
};
 

	
 
void ServerNetworkUDPSocketHandler::Receive_CLIENT_FIND_SERVER(Packet *p, NetworkAddress *client_addr)
 
void ServerNetworkUDPSocketHandler::Receive_CLIENT_FIND_SERVER(Packet *, NetworkAddress *client_addr)
 
{
 
	Packet packet(PACKET_UDP_SERVER_RESPONSE);
 
	this->SendPacket(&packet, client_addr);
 
@@ -91,7 +91,7 @@ public:
 
	virtual ~ClientNetworkUDPSocketHandler() = default;
 
};
 

	
 
void ClientNetworkUDPSocketHandler::Receive_SERVER_RESPONSE(Packet *p, NetworkAddress *client_addr)
 
void ClientNetworkUDPSocketHandler::Receive_SERVER_RESPONSE(Packet *, NetworkAddress *client_addr)
 
{
 
	Debug(net, 3, "Server response from {}", client_addr->GetAddressAsString());
 

	
src/newgrf.cpp
Show inline comments
 
@@ -8552,10 +8552,9 @@ static void StaticGRFInfo(ByteReader *bu
 

	
 
/**
 
 * Set the current NewGRF as unsafe for static use
 
 * @param buf Unused.
 
 * @note Used during safety scan on unsafe actions.
 
 */
 
static void GRFUnsafe(ByteReader *buf)
 
static void GRFUnsafe(ByteReader *)
 
{
 
	SetBit(_cur.grfconfig->flags, GCF_UNSAFE);
 

	
src/newgrf_airport.cpp
Show inline comments
 
@@ -33,7 +33,7 @@ template <typename Tspec, typename Tid, 
 
}
 

	
 
template <typename Tspec, typename Tid, Tid Tmax>
 
bool NewGRFClass<Tspec, Tid, Tmax>::IsUIAvailable(uint index) const
 
bool NewGRFClass<Tspec, Tid, Tmax>::IsUIAvailable(uint) const
 
{
 
	return true;
 
}
 
@@ -153,7 +153,7 @@ void AirportOverrideManager::SetEntitySp
 
	}
 
}
 

	
 
/* virtual */ uint32_t AirportScopeResolver::GetVariable(byte variable, uint32_t parameter, bool *available) const
 
/* virtual */ uint32_t AirportScopeResolver::GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const
 
{
 
	switch (variable) {
 
		case 0x40: return this->layout;
src/newgrf_airport.h
Show inline comments
 
@@ -166,7 +166,7 @@ struct AirportScopeResolver : public Sco
 
	}
 

	
 
	uint32_t GetRandomBits() const override;
 
	uint32_t GetVariable(byte variable, uint32_t parameter, bool *available) const override;
 
	uint32_t GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const override;
 
	void StorePSA(uint pos, int32_t value) override;
 
};
 

	
src/newgrf_airporttiles.cpp
Show inline comments
 
@@ -159,7 +159,7 @@ static uint32_t GetAirportTileIDAtOffset
 
	return 0xFF << 8 | ats->grf_prop.subst_id; // so just give it the substitute
 
}
 

	
 
/* virtual */ uint32_t AirportTileScopeResolver::GetVariable(byte variable, uint32_t parameter, bool *available) const
 
/* virtual */ uint32_t AirportTileScopeResolver::GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const
 
{
 
	assert(this->st != nullptr);
 

	
 
@@ -231,7 +231,7 @@ uint32_t AirportTileResolverObject::GetD
 
	return this->tiles_scope.ats->grf_prop.local_id;
 
}
 

	
 
uint16_t GetAirportTileCallback(CallbackID callback, uint32_t param1, uint32_t param2, const AirportTileSpec *ats, Station *st, TileIndex tile, int extra_data = 0)
 
uint16_t GetAirportTileCallback(CallbackID callback, uint32_t param1, uint32_t param2, const AirportTileSpec *ats, Station *st, TileIndex tile, [[maybe_unused]] int extra_data = 0)
 
{
 
	AirportTileResolverObject object(ats, tile, st, callback, param1, param2);
 
	return object.ResolveCallback();
src/newgrf_airporttiles.h
Show inline comments
 
@@ -38,7 +38,7 @@ struct AirportTileScopeResolver : public
 
	}
 

	
 
	uint32_t GetRandomBits() const override;
 
	uint32_t GetVariable(byte variable, uint32_t parameter, bool *available) const override;
 
	uint32_t GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const override;
 
};
 

	
 
/** Resolver for tiles of an airport. */
src/newgrf_animation_base.h
Show inline comments
 
@@ -19,8 +19,8 @@
 

	
 
template <typename Tobj>
 
struct TileAnimationFrameAnimationHelper {
 
	static byte Get(Tobj *obj, TileIndex tile) { return GetAnimationFrame(tile); }
 
	static void Set(Tobj *obj, TileIndex tile, byte frame) { SetAnimationFrame(tile, frame); }
 
	static byte Get(Tobj *, TileIndex tile) { return GetAnimationFrame(tile); }
 
	static void Set(Tobj *, TileIndex tile, byte frame) { SetAnimationFrame(tile, frame); }
 
};
 

	
 
/**
src/newgrf_canal.cpp
Show inline comments
 
@@ -30,7 +30,7 @@ struct CanalScopeResolver : public Scope
 
	}
 

	
 
	uint32_t GetRandomBits() const override;
 
	uint32_t GetVariable(byte variable, uint32_t parameter, bool *available) const override;
 
	uint32_t GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const override;
 
};
 

	
 
/** Resolver object for canals. */
 
@@ -59,7 +59,7 @@ struct CanalResolverObject : public Reso
 
	return IsTileType(this->tile, MP_WATER) ? GetWaterTileRandomBits(this->tile) : 0;
 
}
 

	
 
/* virtual */ uint32_t CanalScopeResolver::GetVariable(byte variable, uint32_t parameter, bool *available) const
 
/* virtual */ uint32_t CanalScopeResolver::GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const
 
{
 
	switch (variable) {
 
		/* Height of tile */
src/newgrf_commons.h
Show inline comments
 
@@ -197,7 +197,7 @@ protected:
 
	uint16_t max_entities; ///< what is the amount of entities, old and new summed
 

	
 
	uint16_t invalid_id;   ///< ID used to detected invalid entities
 
	virtual bool CheckValidNewID(uint16_t testid) { return true; }
 
	virtual bool CheckValidNewID([[maybe_unused]] uint16_t testid) { return true; }
 

	
 
public:
 
	std::vector<EntityIDMapping> mappings; ///< mapping of ids from grf files.  Public out of convenience
src/newgrf_config.cpp
Show inline comments
 
@@ -226,9 +226,8 @@ void GRFParameterInfo::Finalize()
 
/**
 
 * Update the palettes of the graphics from the config file.
 
 * Called when changing the default palette in advanced settings.
 
 * @param new_value Unused.
 
 */
 
void UpdateNewGRFConfigPalette(int32_t new_value)
 
void UpdateNewGRFConfigPalette(int32_t)
 
{
 
	for (GRFConfig *c = _grfconfig_newgame; c != nullptr; c = c->next) c->SetSuitablePalette();
 
	for (GRFConfig *c = _grfconfig_static;  c != nullptr; c = c->next) c->SetSuitablePalette();
 
@@ -542,7 +541,7 @@ public:
 
	}
 
};
 

	
 
bool GRFFileScanner::AddFile(const std::string &filename, size_t basepath_length, const std::string &tar_filename)
 
bool GRFFileScanner::AddFile(const std::string &filename, size_t basepath_length, const std::string &)
 
{
 
	/* Abort if the user stopped the game during a scan. */
 
	if (_exit_game) return false;
src/newgrf_debug_gui.cpp
Show inline comments
 
@@ -184,7 +184,7 @@ public:
 
	 * @param grfid Parameter for the PSA. Only required for items with parameters.
 
	 * @return Size of the persistent storage in indices.
 
	 */
 
	virtual uint GetPSASize(uint index, uint32_t grfid) const
 
	virtual uint GetPSASize([[maybe_unused]] uint index, [[maybe_unused]] uint32_t grfid) const
 
	{
 
		return 0;
 
	}
 
@@ -195,7 +195,7 @@ public:
 
	 * @param grfid Parameter for the PSA. Only required for items with parameters.
 
	 * @return Pointer to the first position of the storage array or nullptr if not present.
 
	 */
 
	virtual const int32_t *GetPSAFirstPosition(uint index, uint32_t grfid) const
 
	virtual const int32_t *GetPSAFirstPosition([[maybe_unused]] uint index, [[maybe_unused]] uint32_t grfid) const
 
	{
 
		return nullptr;
 
	}
 
@@ -366,7 +366,7 @@ struct NewGRFInspectWindow : Window {
 
		GetFeatureHelper(this->window_number)->SetStringParameters(this->GetFeatureIndex());
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_NGRFI_VEH_CHAIN: {
 
@@ -555,7 +555,7 @@ struct NewGRFInspectWindow : Window {
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_NGRFI_PARENT: {
 
@@ -623,7 +623,7 @@ struct NewGRFInspectWindow : Window {
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 
		if (this->HasChainIndex()) {
 
@@ -869,7 +869,7 @@ struct SpriteAlignerWindow : Window {
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_SA_SPRITE:
 
@@ -934,7 +934,7 @@ struct SpriteAlignerWindow : Window {
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_SA_PREVIOUS:
 
@@ -1044,7 +1044,7 @@ struct SpriteAlignerWindow : Window {
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 
		if (data == 1) {
src/newgrf_engine.cpp
Show inline comments
 
@@ -954,7 +954,7 @@ static uint32_t VehicleGetVariable(Vehic
 
	return UINT_MAX;
 
}
 

	
 
/* virtual */ uint32_t VehicleScopeResolver::GetVariable(byte variable, uint32_t parameter, bool *available) const
 
/* virtual */ uint32_t VehicleScopeResolver::GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const
 
{
 
	if (this->v == nullptr) {
 
		/* Vehicle does not exist, so we're in a purchase list */
src/newgrf_engine.h
Show inline comments
 
@@ -39,7 +39,7 @@ struct VehicleScopeResolver : public Sco
 
	void SetVehicle(const Vehicle *v) { this->v = v; }
 

	
 
	uint32_t GetRandomBits() const override;
 
	uint32_t GetVariable(byte variable, uint32_t parameter, bool *available) const override;
 
	uint32_t GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const override;
 
	uint32_t GetTriggers() const override;
 
};
 

	
src/newgrf_generic.cpp
Show inline comments
 
@@ -41,7 +41,7 @@ struct GenericScopeResolver : public Sco
 
	{
 
	}
 

	
 
	uint32_t GetVariable(byte variable, uint32_t parameter, bool *available) const override;
 
	uint32_t GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const override;
 

	
 
private:
 
	bool ai_callback; ///< Callback comes from the AI.
 
@@ -118,7 +118,7 @@ void AddGenericCallback(uint8_t feature,
 
	_gcl[feature].push_front(GenericCallback(file, group));
 
}
 

	
 
/* virtual */ uint32_t GenericScopeResolver::GetVariable(byte variable, uint32_t parameter, bool *available) const
 
/* virtual */ uint32_t GenericScopeResolver::GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const
 
{
 
	if (this->ai_callback) {
 
		switch (variable) {
src/newgrf_gui.cpp
Show inline comments
 
@@ -208,7 +208,7 @@ struct NewGRFParametersWindow : public W
 
		return this->HasParameterInfo(nr) ? this->grf_config->param_info[nr].value() : GetDummyParameterInfo(nr);
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_NP_NUMPAR_DEC:
 
@@ -329,7 +329,7 @@ struct NewGRFParametersWindow : public W
 
		this->DrawWidgets();
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_NP_NUMPAR_DEC:
 
@@ -459,7 +459,7 @@ struct NewGRFParametersWindow : public W
 
		this->SetDirty();
 
	}
 

	
 
	void OnDropdownClose(Point pt, int widget, int index, bool instant_close) override
 
	void OnDropdownClose(Point, int widget, int, bool) override
 
	{
 
		/* We cannot raise the dropdown button just yet. OnClick needs some hint, whether
 
		 * the same dropdown button was clicked again, and then not open the dropdown again.
 
@@ -480,7 +480,7 @@ struct NewGRFParametersWindow : public W
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 
		if (!this->action14present) {
 
@@ -733,7 +733,7 @@ struct NewGRFWindow : public Window, New
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_NS_FILE_LIST:
 
@@ -932,7 +932,7 @@ struct NewGRFWindow : public Window, New
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		if (widget >= WID_NS_NEWGRF_TEXTFILE && widget < WID_NS_NEWGRF_TEXTFILE + TFT_CONTENT_END) {
 
			if (this->active_sel == nullptr && this->avail_sel == nullptr) return;
 
@@ -1223,7 +1223,7 @@ struct NewGRFWindow : public Window, New
 
	 * @param data Information about the changed data. @see GameOptionsInvalidationData
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 
		switch (data) {
 
@@ -1334,7 +1334,7 @@ struct NewGRFWindow : public Window, New
 
		this->SetWidgetDisabledState(WID_NS_PRESET_SAVE, has_missing);
 
	}
 

	
 
	EventState OnKeyPress(char32_t key, uint16_t keycode) override
 
	EventState OnKeyPress([[maybe_unused]] char32_t key, uint16_t keycode) override
 
	{
 
		if (!this->editable) return ES_NOT_HANDLED;
 

	
 
@@ -2086,7 +2086,7 @@ struct SavePresetWindow : public Window 
 
	{
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_SVP_PRESET_LIST: {
 
@@ -2127,7 +2127,7 @@ struct SavePresetWindow : public Window 
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_SVP_PRESET_LIST: {
 
@@ -2201,7 +2201,7 @@ struct ScanProgressWindow : public Windo
 
		this->InitNested(1);
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_SP_PROGRESS_BAR: {
src/newgrf_house.cpp
Show inline comments
 
@@ -294,7 +294,7 @@ static uint32_t GetDistanceFromNearbyHou
 
/**
 
 * @note Used by the resolver to get values for feature 07 deterministic spritegroups.
 
 */
 
/* virtual */ uint32_t HouseScopeResolver::GetVariable(byte variable, uint32_t parameter, bool *available) const
 
/* virtual */ uint32_t HouseScopeResolver::GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const
 
{
 
	switch (variable) {
 
		/* Construction stage. */
src/newgrf_house.h
Show inline comments
 
@@ -43,7 +43,7 @@ struct HouseScopeResolver : public Scope
 
	}
 

	
 
	uint32_t GetRandomBits() const override;
 
	uint32_t GetVariable(byte variable, uint32_t parameter, bool *available) const override;
 
	uint32_t GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const override;
 
	uint32_t GetTriggers() const override;
 
};
 

	
src/newgrf_industries.cpp
Show inline comments
 
@@ -156,7 +156,7 @@ static uint32_t GetCountAndDistanceOfClo
 
	return count << 16 | GB(closest_dist, 0, 16);
 
}
 

	
 
/* virtual */ uint32_t IndustriesScopeResolver::GetVariable(byte variable, uint32_t parameter, bool *available) const
 
/* virtual */ uint32_t IndustriesScopeResolver::GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const
 
{
 
	if (this->ro.callback == CBID_INDUSTRY_LOCATION) {
 
		/* Variables available during construction check. */
src/newgrf_industries.h
Show inline comments
 
@@ -33,7 +33,7 @@ struct IndustriesScopeResolver : public 
 
	}
 

	
 
	uint32_t GetRandomBits() const override;
 
	uint32_t GetVariable(byte variable, uint32_t parameter, bool *available) const override;
 
	uint32_t GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const override;
 
	uint32_t GetTriggers() const override;
 
	void StorePSA(uint pos, int32_t value) override;
 
};
src/newgrf_industrytiles.cpp
Show inline comments
 
@@ -58,7 +58,7 @@ uint32_t GetRelativePosition(TileIndex t
 
	return ((y & 0xF) << 20) | ((x & 0xF) << 16) | (y << 8) | x;
 
}
 

	
 
/* virtual */ uint32_t IndustryTileScopeResolver::GetVariable(byte variable, uint32_t parameter, bool *available) const
 
/* virtual */ uint32_t IndustryTileScopeResolver::GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const
 
{
 
	switch (variable) {
 
		/* Construction state of the tile: a value between 0 and 3 */
 
@@ -251,7 +251,7 @@ CommandCost PerformIndustryTileSlopeChec
 
}
 

	
 
/* Simple wrapper for GetHouseCallback to keep the animation unified. */
 
uint16_t GetSimpleIndustryCallback(CallbackID callback, uint32_t param1, uint32_t param2, const IndustryTileSpec *spec, Industry *ind, TileIndex tile, int extra_data)
 
uint16_t GetSimpleIndustryCallback(CallbackID callback, uint32_t param1, uint32_t param2, const IndustryTileSpec *spec, Industry *ind, TileIndex tile, int)
 
{
 
	return GetIndustryTileCallback(callback, param1, param2, spec - GetIndustryTileSpec(0), ind, tile);
 
}
src/newgrf_industrytiles.h
Show inline comments
 
@@ -31,7 +31,7 @@ struct IndustryTileScopeResolver : publi
 
	}
 

	
 
	uint32_t GetRandomBits() const override;
 
	uint32_t GetVariable(byte variable, uint32_t parameter, bool *available) const override;
 
	uint32_t GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const override;
 
	uint32_t GetTriggers() const override;
 
};
 

	
src/newgrf_object.cpp
Show inline comments
 
@@ -253,7 +253,7 @@ static uint32_t GetCountAndDistanceOfClo
 
}
 

	
 
/** Used by the resolver to get values for feature 0F deterministic spritegroups. */
 
/* virtual */ uint32_t ObjectScopeResolver::GetVariable(byte variable, uint32_t parameter, bool *available) const
 
/* virtual */ uint32_t ObjectScopeResolver::GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const
 
{
 
	/* We get the town from the object, or we calculate the closest
 
	 * town if we need to when there's no object. */
 
@@ -524,10 +524,9 @@ void DrawNewObjectTileInGUI(int x, int y
 
 * @param spec     The specification of the object / the entry point.
 
 * @param o        The object to call the callback for.
 
 * @param tile     The tile the callback is called for.
 
 * @param extra_data Ignored.
 
 * @return The result of the callback.
 
 */
 
uint16_t StubGetObjectCallback(CallbackID callback, uint32_t param1, uint32_t param2, const ObjectSpec *spec, Object *o, TileIndex tile, int extra_data)
 
uint16_t StubGetObjectCallback(CallbackID callback, uint32_t param1, uint32_t param2, const ObjectSpec *spec, Object *o, TileIndex tile, int)
 
{
 
	return GetObjectCallback(callback, param1, param2, spec, o, tile);
 
}
src/newgrf_object.h
Show inline comments
 
@@ -127,7 +127,7 @@ struct ObjectScopeResolver : public Scop
 
	}
 

	
 
	uint32_t GetRandomBits() const override;
 
	uint32_t GetVariable(byte variable, uint32_t parameter, bool *available) const override;
 
	uint32_t GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const override;
 
};
 

	
 
/** A resolver object to be used with feature 0F spritegroups. */
src/newgrf_railtype.cpp
Show inline comments
 
@@ -23,7 +23,7 @@
 
	return GB(tmp, 0, 2);
 
}
 

	
 
/* virtual */ uint32_t RailTypeScopeResolver::GetVariable(byte variable, uint32_t parameter, bool *available) const
 
/* virtual */ uint32_t RailTypeScopeResolver::GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const
 
{
 
	if (this->tile == INVALID_TILE) {
 
		switch (variable) {
src/newgrf_railtype.h
Show inline comments
 
@@ -32,7 +32,7 @@ struct RailTypeScopeResolver : public Sc
 
	}
 

	
 
	uint32_t GetRandomBits() const override;
 
	uint32_t GetVariable(byte variable, uint32_t parameter, bool *available) const override;
 
	uint32_t GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const override;
 
};
 

	
 
/** Resolver object for rail types. */
src/newgrf_roadstop.cpp
Show inline comments
 
@@ -38,7 +38,7 @@ void NewGRFClass<Tspec, Tid, Tmax>::Inse
 
}
 

	
 
template <typename Tspec, typename Tid, Tid Tmax>
 
bool NewGRFClass<Tspec, Tid, Tmax>::IsUIAvailable(uint index) const
 
bool NewGRFClass<Tspec, Tid, Tmax>::IsUIAvailable(uint) const
 
{
 
	return true;
 
}
 
@@ -63,7 +63,7 @@ uint32_t RoadStopScopeResolver::GetTrigg
 
	return this->st == nullptr ? 0 : this->st->waiting_triggers;
 
}
 

	
 
uint32_t RoadStopScopeResolver::GetVariable(byte variable, uint32_t parameter, bool *available) const
 
uint32_t RoadStopScopeResolver::GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const
 
{
 
	auto get_road_type_variable = [&](RoadTramType rtt) -> uint32_t {
 
		RoadType rt;
 
@@ -305,7 +305,7 @@ void DrawRoadStopTile(int x, int y, Road
 
}
 

	
 
/** Wrapper for animation control, see GetRoadStopCallback. */
 
uint16_t GetAnimRoadStopCallback(CallbackID callback, uint32_t param1, uint32_t param2, const RoadStopSpec *roadstopspec, BaseStation *st, TileIndex tile, int extra_data)
 
uint16_t GetAnimRoadStopCallback(CallbackID callback, uint32_t param1, uint32_t param2, const RoadStopSpec *roadstopspec, BaseStation *st, TileIndex tile, int)
 
{
 
	return GetRoadStopCallback(callback, param1, param2, roadstopspec, st, tile, INVALID_ROADTYPE, GetStationType(tile), GetStationGfx(tile));
 
}
src/newgrf_roadstop.h
Show inline comments
 
@@ -89,7 +89,7 @@ struct RoadStopScopeResolver : public Sc
 
	uint32_t GetRandomBits() const override;
 
	uint32_t GetTriggers() const override;
 

	
 
	uint32_t GetVariable(byte variable, uint32_t parameter, bool *available) const override;
 
	uint32_t GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const override;
 
};
 

	
 
/** Road stop resolver. */
src/newgrf_roadtype.cpp
Show inline comments
 
@@ -23,7 +23,7 @@
 
	return GB(tmp, 0, 2);
 
}
 

	
 
/* virtual */ uint32_t RoadTypeScopeResolver::GetVariable(byte variable, uint32_t parameter, bool *available) const
 
/* virtual */ uint32_t RoadTypeScopeResolver::GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const
 
{
 
	if (this->tile == INVALID_TILE) {
 
		switch (variable) {
src/newgrf_roadtype.h
Show inline comments
 
@@ -33,7 +33,7 @@ struct RoadTypeScopeResolver : public Sc
 
	}
 

	
 
	/* virtual */ uint32_t GetRandomBits() const;
 
	/* virtual */ uint32_t GetVariable(byte variable, uint32_t parameter, bool *available) const;
 
	/* virtual */ uint32_t GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const;
 
};
 

	
 
/** Resolver object for road types. */
src/newgrf_spritegroup.cpp
Show inline comments
 
@@ -103,7 +103,7 @@ static inline uint32_t GetVariable(const
 
 * @param[out] available Set to false, in case the variable does not exist.
 
 * @return Value
 
 */
 
/* virtual */ uint32_t ScopeResolver::GetVariable(byte variable, uint32_t parameter, bool *available) const
 
/* virtual */ uint32_t ScopeResolver::GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const
 
{
 
	Debug(grf, 1, "Unhandled scope variable 0x{:X}", variable);
 
	*available = false;
 
@@ -112,10 +112,8 @@ static inline uint32_t GetVariable(const
 

	
 
/**
 
 * Store a value into the persistent storage area (PSA). Default implementation does nothing (for newgrf classes without storage).
 
 * @param reg Position to store into.
 
 * @param value Value to store.
 
 */
 
/* virtual */ void ScopeResolver::StorePSA(uint reg, int32_t value) {}
 
/* virtual */ void ScopeResolver::StorePSA(uint, int32_t) {}
 

	
 
/**
 
 * Get the real sprites of the grf.
 
@@ -132,11 +130,9 @@ static inline uint32_t GetVariable(const
 

	
 
/**
 
 * Get a resolver for the \a scope.
 
 * @param scope Scope to return.
 
 * @param relative Additional parameter for #VSG_SCOPE_RELATIVE.
 
 * @return The resolver for the requested scope.
 
 */
 
/* virtual */ ScopeResolver *ResolverObject::GetScope(VarSpriteGroupScope scope, byte relative)
 
/* virtual */ ScopeResolver *ResolverObject::GetScope(VarSpriteGroupScope, byte)
 
{
 
	return &this->default_scope;
 
}
src/newgrf_spritegroup.h
Show inline comments
 
@@ -58,7 +58,7 @@ struct SpriteGroup : SpriteGroupPool::Po
 
protected:
 
	SpriteGroup(SpriteGroupType type) : nfo_line(0), type(type) {}
 
	/** Base sprite group resolver */
 
	virtual const SpriteGroup *Resolve(ResolverObject &object) const { return this; };
 
	virtual const SpriteGroup *Resolve([[maybe_unused]] ResolverObject &object) const { return this; };
 

	
 
public:
 
	virtual ~SpriteGroup() = default;
 
@@ -294,7 +294,7 @@ struct ScopeResolver {
 
	virtual uint32_t GetRandomBits() const;
 
	virtual uint32_t GetTriggers() const;
 

	
 
	virtual uint32_t GetVariable(byte variable, uint32_t parameter, bool *available) const;
 
	virtual uint32_t GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const;
 
	virtual void StorePSA(uint reg, int32_t value);
 
};
 

	
src/newgrf_station.cpp
Show inline comments
 
@@ -39,7 +39,7 @@ template <typename Tspec, typename Tid, 
 
}
 

	
 
template <typename Tspec, typename Tid, Tid Tmax>
 
bool NewGRFClass<Tspec, Tid, Tmax>::IsUIAvailable(uint index) const
 
bool NewGRFClass<Tspec, Tid, Tmax>::IsUIAvailable(uint) const
 
{
 
	return true;
 
}
 
@@ -266,7 +266,7 @@ TownScopeResolver *StationResolverObject
 
	return this->town_scope;
 
}
 

	
 
/* virtual */ uint32_t StationScopeResolver::GetVariable(byte variable, uint32_t parameter, bool *available) const
 
/* virtual */ uint32_t StationScopeResolver::GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const
 
{
 
	if (this->st == nullptr) {
 
		/* Station does not exist, so we're in a purchase list or the land slope check callback. */
 
@@ -458,7 +458,7 @@ uint32_t Station::GetNewGRFVariable(cons
 
	return UINT_MAX;
 
}
 

	
 
uint32_t Waypoint::GetNewGRFVariable(const ResolverObject &object, byte variable, byte parameter, bool *available) const
 
uint32_t Waypoint::GetNewGRFVariable(const ResolverObject &, byte variable, [[maybe_unused]] byte parameter, bool *available) const
 
{
 
	switch (variable) {
 
		case 0x48: return 0; // Accepted cargo types
 
@@ -886,7 +886,7 @@ bool CanStationTileHaveWires(TileIndex t
 
}
 

	
 
/** Wrapper for animation control, see GetStationCallback. */
 
uint16_t GetAnimStationCallback(CallbackID callback, uint32_t param1, uint32_t param2, const StationSpec *statspec, BaseStation *st, TileIndex tile, int extra_data)
 
uint16_t GetAnimStationCallback(CallbackID callback, uint32_t param1, uint32_t param2, const StationSpec *statspec, BaseStation *st, TileIndex tile, int)
 
{
 
	return GetStationCallback(callback, param1, param2, statspec, st, tile);
 
}
src/newgrf_station.h
Show inline comments
 
@@ -43,7 +43,7 @@ struct StationScopeResolver : public Sco
 
	uint32_t GetRandomBits() const override;
 
	uint32_t GetTriggers() const override;
 

	
 
	uint32_t GetVariable(byte variable, uint32_t parameter, bool *available) const override;
 
	uint32_t GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const override;
 
};
 

	
 
/** Station resolver. */
src/newgrf_storage.cpp
Show inline comments
 
@@ -51,7 +51,7 @@ void AddChangedPersistentStorage(BasePer
 
 * @param mode Mode switch affecting temporary/persistent changes.
 
 * @param ignore_prev_mode Disable some sanity checks for exceptional call circumstances.
 
 */
 
/* static */ void BasePersistentStorageArray::SwitchMode(PersistentStorageMode mode, bool ignore_prev_mode)
 
/* static */ void BasePersistentStorageArray::SwitchMode(PersistentStorageMode mode, [[maybe_unused]] bool ignore_prev_mode)
 
{
 
	switch (mode) {
 
		case PSM_ENTER_GAMELOOP:
src/newgrf_town.cpp
Show inline comments
 
@@ -15,7 +15,7 @@
 

	
 
#include "safeguards.h"
 

	
 
/* virtual */ uint32_t TownScopeResolver::GetVariable(byte variable, uint32_t parameter, bool *available) const
 
/* virtual */ uint32_t TownScopeResolver::GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const
 
{
 
	switch (variable) {
 
		/* Larger towns */
src/newgrf_town.h
Show inline comments
 
@@ -34,7 +34,7 @@ struct TownScopeResolver : public ScopeR
 
	{
 
	}
 

	
 
	virtual uint32_t GetVariable(byte variable, uint32_t parameter, bool *available) const;
 
	virtual uint32_t GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const;
 
	virtual void StorePSA(uint reg, int32_t value);
 
};
 

	
src/news_gui.cpp
Show inline comments
 
@@ -336,13 +336,13 @@ struct NewsWindow : Window {
 
		GfxFillRect( r.left,  ir.bottom,  r.right,  r.bottom, PC_BLACK);
 
	}
 

	
 
	Point OnInitialPosition(int16_t sm_width, int16_t sm_height, int window_number) override
 
	Point OnInitialPosition([[maybe_unused]] int16_t sm_width, [[maybe_unused]] int16_t sm_height, [[maybe_unused]] int window_number) override
 
	{
 
		Point pt = { 0, _screen.height };
 
		return pt;
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		StringID str = STR_NULL;
 
		switch (widget) {
 
@@ -478,7 +478,7 @@ struct NewsWindow : Window {
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_N_CLOSEBOX:
 
@@ -540,7 +540,7 @@ struct NewsWindow : Window {
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 
		/* The chatbar has notified us that is was either created or closed */
 
@@ -549,7 +549,7 @@ struct NewsWindow : Window {
 
		this->SetWindowTop(newtop);
 
	}
 

	
 
	void OnRealtimeTick(uint delta_ms) override
 
	void OnRealtimeTick([[maybe_unused]] uint delta_ms) override
 
	{
 
		/* Decrement the news timer. We don't need to action an elapsed event here,
 
		 * so no need to use TimerElapsed(). */
 
@@ -1126,7 +1126,7 @@ struct MessageHistoryWindow : Window {
 
		this->OnInvalidateData(0);
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		if (widget == WID_MH_BACKGROUND) {
 
			this->line_height = FONT_HEIGHT_NORMAL + WidgetDimensions::scaled.vsep_normal;
 
@@ -1181,13 +1181,13 @@ struct MessageHistoryWindow : Window {
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 
		this->vscroll->SetCount(_total_news);
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		if (widget == WID_MH_BACKGROUND) {
 
			NewsItem *ni = _latest_news;
src/object_cmd.cpp
Show inline comments
 
@@ -486,7 +486,7 @@ static void DrawTile_Object(TileInfo *ti
 
	DrawBridgeMiddle(ti);
 
}
 

	
 
static int GetSlopePixelZ_Object(TileIndex tile, uint x, uint y, bool ground_vehicle)
 
static int GetSlopePixelZ_Object(TileIndex tile, uint x, uint y, bool)
 
{
 
	if (IsObjectType(tile, OBJECT_OWNED_LAND)) {
 
		int z;
 
@@ -700,7 +700,7 @@ static void TileLoop_Object(TileIndex ti
 
}
 

	
 

	
 
static TrackStatus GetTileTrackStatus_Object(TileIndex tile, TransportType mode, uint sub_mode, DiagDirection side)
 
static TrackStatus GetTileTrackStatus_Object(TileIndex, TransportType, uint, DiagDirection)
 
{
 
	return 0;
 
}
 
@@ -721,10 +721,9 @@ static void AnimateTile_Object(TileIndex
 
/**
 
 * Helper function for \c CircularTileSearch.
 
 * @param tile The tile to check.
 
 * @param user Ignored.
 
 * @return True iff the tile has a radio tower.
 
 */
 
static bool HasTransmitter(TileIndex tile, void *user)
 
static bool HasTransmitter(TileIndex tile, void *)
 
{
 
	return IsObjectTypeTile(tile, OBJECT_TRANSMITTER);
 
}
src/object_gui.cpp
Show inline comments
 
@@ -222,7 +222,7 @@ public:
 
		this->object_margin = ScaleGUITrad(4);
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_BO_CLASS_LIST: {
 
@@ -490,7 +490,7 @@ public:
 
		this->SetDirty();
 
	}
 

	
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 

	
 
@@ -502,7 +502,7 @@ public:
 
		this->vscroll->SetCapacityFromWidget(this, WID_BO_CLASS_LIST);
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (GB(widget, 0, 16)) {
 
			case WID_BO_CLASS_LIST: {
 
@@ -530,7 +530,7 @@ public:
 
		}
 
	}
 

	
 
	void OnPlaceObject(Point pt, TileIndex tile) override
 
	void OnPlaceObject([[maybe_unused]] Point pt, TileIndex tile) override
 
	{
 
		const ObjectSpec *spec = ObjectClass::Get(_selected_object_class)->GetSpec(_selected_object_index);
 

	
 
@@ -541,12 +541,12 @@ public:
 
		}
 
	}
 

	
 
	void OnPlaceDrag(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt) override
 
	void OnPlaceDrag(ViewportPlaceMethod select_method, [[maybe_unused]] ViewportDragDropSelectionProcess select_proc, [[maybe_unused]] Point pt) override
 
	{
 
		VpSelectTilesWithMethod(pt.x, pt.y, select_method);
 
	}
 

	
 
	void OnPlaceMouseUp(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile) override
 
	void OnPlaceMouseUp([[maybe_unused]] ViewportPlaceMethod select_method, [[maybe_unused]] ViewportDragDropSelectionProcess select_proc, [[maybe_unused]] Point pt, TileIndex start_tile, TileIndex end_tile) override
 
	{
 
		if (pt.x == -1) return;
 

	
src/order_base.h
Show inline comments
 
@@ -359,7 +359,7 @@ public:
 
	 *       into the shared vehicle chain.
 
	 * @param v vehicle to add to the list
 
	 */
 
	inline void AddVehicle(Vehicle *v) { ++this->num_vehicles; }
 
	inline void AddVehicle([[maybe_unused]] Vehicle *v) { ++this->num_vehicles; }
 

	
 
	void RemoveVehicle(Vehicle *v);
 

	
src/order_gui.cpp
Show inline comments
 
@@ -801,7 +801,7 @@ public:
 
		this->OnInvalidateData(VIWD_MODIFY_ORDERS);
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_O_ORDER_LIST:
 
@@ -838,7 +838,7 @@ public:
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		VehicleOrderID from = INVALID_VEH_ORDER_ID;
 
		VehicleOrderID to   = INVALID_VEH_ORDER_ID;
 
@@ -1161,7 +1161,7 @@ public:
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_O_ORDER_LIST: {
 
@@ -1448,7 +1448,7 @@ public:
 
		return ES_HANDLED;
 
	}
 

	
 
	void OnPlaceObject(Point pt, TileIndex tile) override
 
	void OnPlaceObject([[maybe_unused]] Point pt, TileIndex tile) override
 
	{
 
		if (this->goto_type == OPOS_GOTO) {
 
			const Order cmd = GetOrderCmdFromTile(this->vehicle, tile);
src/os/macosx/crashlog_osx.cpp
Show inline comments
 
@@ -177,9 +177,8 @@ static sigset_t SetSignals(void(*handler
 
/**
 
 * Entry point for a crash that happened during the handling of a crash.
 
 *
 
 * @param signum the signal that caused us to crash.
 
 */
 
static void CDECL HandleInternalCrash(int signum)
 
static void CDECL HandleInternalCrash(int)
 
{
 
	if (CrashLogOSX::current == nullptr || !CrashLogOSX::current->try_execute_active) {
 
		fmt::print("Something went seriously wrong when creating the crash log. Aborting.\n");
src/os/macosx/font_osx.cpp
Show inline comments
 
@@ -24,7 +24,7 @@
 

	
 
#include "safeguards.h"
 

	
 
bool SetFallbackFont(FontCacheSettings *settings, const std::string &language_isocode, int winlangid, MissingGlyphSearcher *callback)
 
bool SetFallbackFont(FontCacheSettings *settings, const std::string &language_isocode, int, MissingGlyphSearcher *callback)
 
{
 
	/* Determine fallback font using CoreText. This uses the language isocode
 
	 * to find a suitable font. CoreText is available from 10.5 onwards. */
src/os/unix/crashlog_unix.cpp
Show inline comments
 
@@ -53,7 +53,7 @@ class CrashLogUnix : public CrashLog {
 
		survey["reason"] = strsignal(signum);
 
	}
 

	
 
	void SurveyStacktrace(nlohmann::json &survey) const override
 
	void SurveyStacktrace([[maybe_unused]] nlohmann::json &survey) const override
 
	{
 
#if defined(__GLIBC__)
 
		void *trace[64];
 
@@ -166,7 +166,7 @@ static sigset_t SetSignals(void(*handler
 
 *
 
 * @param signum the signal that caused us to crash.
 
 */
 
static void CDECL HandleInternalCrash(int signum)
 
static void CDECL HandleInternalCrash([[maybe_unused]] int signum)
 
{
 
	if (CrashLogUnix::current == nullptr || !CrashLogUnix::current->try_execute_active) {
 
		fmt::print("Something went seriously wrong when creating the crash log. Aborting.\n");
src/os/unix/font_unix.cpp
Show inline comments
 
@@ -95,7 +95,7 @@ FT_Error GetFontByFaceName(const char *f
 
	return err;
 
}
 

	
 
bool SetFallbackFont(FontCacheSettings *settings, const std::string &language_isocode, int winlangid, MissingGlyphSearcher *callback)
 
bool SetFallbackFont(FontCacheSettings *settings, const std::string &language_isocode, int, MissingGlyphSearcher *callback)
 
{
 
	bool ret = false;
 

	
src/os/unix/unix.cpp
Show inline comments
 
@@ -59,7 +59,7 @@ bool FiosIsRoot(const std::string &path)
 
	return path == PATHSEP;
 
}
 

	
 
void FiosGetDrives(FileList &file_list)
 
void FiosGetDrives(FileList &)
 
{
 
	return;
 
}
 
@@ -199,7 +199,7 @@ void ShowInfoI(const std::string &str)
 
}
 

	
 
#if !defined(__APPLE__)
 
void ShowOSErrorBox(const char *buf, bool system)
 
void ShowOSErrorBox(const char *buf, bool)
 
{
 
	/* All unix systems, except OSX. Only use escape codes on a TTY. */
 
	if (isatty(fileno(stderr))) {
 
@@ -251,7 +251,7 @@ void OSOpenBrowser(const char *url)
 
}
 
#endif /* __APPLE__ */
 

	
 
void SetCurrentThreadName(const char *threadName) {
 
void SetCurrentThreadName([[maybe_unused]] const char *threadName) {
 
#if defined(__GLIBC__)
 
	if (threadName) pthread_setname_np(pthread_self(), threadName);
 
#endif /* defined(__GLIBC__) */
src/os/windows/crashlog_win.cpp
Show inline comments
 
@@ -98,7 +98,7 @@ class CrashLogWindows : public CrashLog 
 
public:
 

	
 
#ifdef WITH_UNOFFICIAL_BREAKPAD
 
	static bool MinidumpCallback(const wchar_t *dump_dir, const wchar_t *minidump_id, void *context, EXCEPTION_POINTERS *exinfo, MDRawAssertionInfo *assertion, bool succeeded)
 
	static bool MinidumpCallback(const wchar_t *dump_dir, const wchar_t *minidump_id, void *context, EXCEPTION_POINTERS *, MDRawAssertionInfo *, bool succeeded)
 
	{
 
		CrashLogWindows *crashlog = reinterpret_cast<CrashLogWindows *>(context);
 

	
 
@@ -287,7 +287,7 @@ static const uint MAX_FRAMES     = 64;
 
	}
 
}
 
#else
 
/* virtual */ void CrashLogWindows::SurveyStacktrace(nlohmann::json &survey) const
 
/* virtual */ void CrashLogWindows::SurveyStacktrace(nlohmann::json &) const
 
{
 
	/* Not supported. */
 
}
 
@@ -380,7 +380,7 @@ static LONG WINAPI VectoredExceptionHand
 
	return EXCEPTION_CONTINUE_SEARCH;
 
}
 

	
 
static void CDECL CustomAbort(int signal)
 
static void CDECL CustomAbort(int)
 
{
 
	RaiseException(CUSTOM_ABORT_EXCEPTION, 0, 0, nullptr);
 
}
 
@@ -461,7 +461,7 @@ static void SetWndSize(HWND wnd, int mod
 
	}
 
}
 

	
 
static INT_PTR CALLBACK CrashDialogFunc(HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
static INT_PTR CALLBACK CrashDialogFunc(HWND wnd, UINT msg, WPARAM wParam, LPARAM)
 
{
 
	switch (msg) {
 
		case WM_INITDIALOG: {
src/os/windows/font_win32.cpp
Show inline comments
 
@@ -88,7 +88,7 @@ static int CALLBACK EnumFontCallback(con
 
	return 0; // stop enumerating
 
}
 

	
 
bool SetFallbackFont(FontCacheSettings *settings, const std::string &language_isocode, int winlangid, MissingGlyphSearcher *callback)
 
bool SetFallbackFont(FontCacheSettings *settings, const std::string &, int winlangid, MissingGlyphSearcher *callback)
 
{
 
	Debug(fontcache, 1, "Trying fallback fonts");
 
	EFCParam langInfo;
src/os/windows/win32.cpp
Show inline comments
 
@@ -45,7 +45,7 @@ bool MyShowCursor(bool show, bool toggle
 
	return !show;
 
}
 

	
 
void ShowOSErrorBox(const char *buf, bool system)
 
void ShowOSErrorBox(const char *buf, bool)
 
{
 
	MyShowCursor(true);
 
	MessageBox(GetActiveWindow(), OTTD2FS(buf).c_str(), L"Error!", MB_ICONSTOP | MB_TASKMODAL);
 
@@ -190,7 +190,7 @@ void FiosGetDrives(FileList &file_list)
 
	}
 
}
 

	
 
bool FiosIsValidFile(const std::string &path, const struct dirent *ent, struct stat *sb)
 
bool FiosIsValidFile(const std::string &, const struct dirent *ent, struct stat *sb)
 
{
 
	/* hectonanoseconds between Windows and POSIX epoch */
 
	static const int64_t posix_epoch_hns = 0x019DB1DED53E8000LL;
 
@@ -283,7 +283,7 @@ void CreateConsole()
 
static const char *_help_msg;
 

	
 
/** Callback function to handle the window */
 
static INT_PTR CALLBACK HelpDialogFunc(HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
static INT_PTR CALLBACK HelpDialogFunc(HWND wnd, UINT msg, WPARAM wParam, LPARAM)
 
{
 
	switch (msg) {
 
		case WM_INITDIALOG: {
src/os/windows/win32_main.cpp
Show inline comments
 
@@ -51,7 +51,7 @@ static int ParseCommandLine(char *line, 
 

	
 
void CreateConsole();
 

	
 
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
 
int APIENTRY WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
 
{
 
	/* Set system timer resolution to 1ms. */
 
	timeBeginPeriod(1);
src/osk_gui.cpp
Show inline comments
 
@@ -101,7 +101,7 @@ struct OskWindow : public Window {
 
		DrawCharCentered(_keyboard[this->shift][widget], r, TC_BLACK);
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		/* clicked a letter */
 
		if (widget >= WID_OSK_LETTERS) {
 
@@ -190,7 +190,7 @@ struct OskWindow : public Window {
 
		this->parent->SetWidgetDirty(this->text_btn);
 
	}
 

	
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 
		this->SetWidgetDirty(WID_OSK_TEXT);
src/pathfinder/npf/npf.cpp
Show inline comments
 
@@ -148,7 +148,7 @@ static uint NPFHash(TileIndex tile, Trac
 
	return ((part1 << NPF_HASH_HALFBITS | part2) + (NPF_HASH_SIZE * dir / TRACKDIR_END)) % NPF_HASH_SIZE;
 
}
 

	
 
static int32_t NPFCalcZero(AyStar *as, AyStarNode *current, OpenListNode *parent)
 
static int32_t NPFCalcZero(AyStar *, AyStarNode *, OpenListNode *)
 
{
 
	return 0;
 
}
 
@@ -156,7 +156,7 @@ static int32_t NPFCalcZero(AyStar *as, A
 
/* Calculates the heuristic to the target station or tile. For train stations, it
 
 * takes into account the direction of approach.
 
 */
 
static int32_t NPFCalcStationOrTileHeuristic(AyStar *as, AyStarNode *current, OpenListNode *parent)
 
static int32_t NPFCalcStationOrTileHeuristic(AyStar *as, AyStarNode *current, OpenListNode *)
 
{
 
	NPFFindStationOrTileData *fstd = (NPFFindStationOrTileData*)as->user_target;
 
	NPFFoundTargetData *ftd = (NPFFoundTargetData*)as->user_path;
 
@@ -312,7 +312,7 @@ static Vehicle *CountShipProc(Vehicle *v
 
	return nullptr;
 
}
 

	
 
static int32_t NPFWaterPathCost(AyStar *as, AyStarNode *current, OpenListNode *parent)
 
static int32_t NPFWaterPathCost(AyStar *, AyStarNode *current, OpenListNode *parent)
 
{
 
	int32_t cost = 0;
 
	Trackdir trackdir = current->direction;
 
@@ -340,7 +340,7 @@ static int32_t NPFWaterPathCost(AyStar *
 
}
 

	
 
/* Determine the cost of this node, for road tracks */
 
static int32_t NPFRoadPathCost(AyStar *as, AyStarNode *current, OpenListNode *parent)
 
static int32_t NPFRoadPathCost(AyStar *, AyStarNode *current, OpenListNode *)
 
{
 
	TileIndex tile = current->tile;
 
	int32_t cost = 0;
src/pathfinder/npf/queue.cpp
Show inline comments
 
@@ -130,7 +130,7 @@ bool BinaryHeap::Push(void *item, int pr
 
 * known, which speeds up the deleting for some queue's. Should be -1
 
 * if not known.
 
 */
 
bool BinaryHeap::Delete(void *item, int priority)
 
bool BinaryHeap::Delete(void *item, int)
 
{
 
	uint i = 0;
 

	
src/pathfinder/yapf/yapf_costcache.hpp
Show inline comments
 
@@ -28,7 +28,7 @@ public:
 
	 * Called by YAPF to attach cached or local segment cost data to the given node.
 
	 *  @return true if globally cached data were used or false if local data was used
 
	 */
 
	inline bool PfNodeCacheFetch(Node &n)
 
	inline bool PfNodeCacheFetch(Node &)
 
	{
 
		return false;
 
	}
 
@@ -37,7 +37,7 @@ public:
 
	 * Called by YAPF to flush the cached segment cost data back into cache storage.
 
	 *  Current cache implementation doesn't use that.
 
	 */
 
	inline void PfNodeCacheFlush(Node &n)
 
	inline void PfNodeCacheFlush(Node &)
 
	{
 
	}
 
};
 
@@ -84,7 +84,7 @@ public:
 
	 * Called by YAPF to flush the cached segment cost data back into cache storage.
 
	 *  Current cache implementation doesn't use that.
 
	 */
 
	inline void PfNodeCacheFlush(Node &n)
 
	inline void PfNodeCacheFlush(Node &)
 
	{
 
	}
 
};
 
@@ -101,7 +101,7 @@ struct CSegmentCostCacheBase
 
{
 
	static int   s_rail_change_counter;
 

	
 
	static void NotifyTrackLayoutChange(TileIndex tile, Track track)
 
	static void NotifyTrackLayoutChange(TileIndex, Track)
 
	{
 
		s_rail_change_counter++;
 
	}
 
@@ -213,7 +213,7 @@ public:
 
	 * Called by YAPF to flush the cached segment cost data back into cache storage.
 
	 *  Current cache implementation doesn't use that.
 
	 */
 
	inline void PfNodeCacheFlush(Node &n)
 
	inline void PfNodeCacheFlush(Node &)
 
	{
 
	}
 
};
src/pathfinder/yapf/yapf_destrail.hpp
Show inline comments
 
@@ -52,7 +52,7 @@ public:
 
	}
 

	
 
	/** Called by YAPF to detect if node ends in the desired destination */
 
	inline bool PfDetectDestination(TileIndex tile, Trackdir td)
 
	inline bool PfDetectDestination(TileIndex tile, Trackdir)
 
	{
 
		bool bDest = IsRailDepotTile(tile);
 
		return bDest;
src/pathfinder/yapf/yapf_rail.cpp
Show inline comments
 
@@ -417,7 +417,7 @@ public:
 
		return result1;
 
	}
 

	
 
	inline Trackdir ChooseRailTrack(const Train *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found, bool reserve_track, PBSTileInfo *target, TileIndex *dest)
 
	inline Trackdir ChooseRailTrack(const Train *v, TileIndex, DiagDirection, TrackBits, bool &path_found, bool reserve_track, PBSTileInfo *target, TileIndex *dest)
 
	{
 
		if (target != nullptr) target->tile = INVALID_TILE;
 
		if (dest != nullptr) *dest = INVALID_TILE;
src/pathfinder/yapf/yapf_road.cpp
Show inline comments
 
@@ -35,7 +35,7 @@ protected:
 
		return *static_cast<Tpf *>(this);
 
	}
 

	
 
	int SlopeCost(TileIndex tile, TileIndex next_tile, Trackdir trackdir)
 
	int SlopeCost(TileIndex tile, TileIndex next_tile, Trackdir)
 
	{
 
		/* height of the center of the current tile */
 
		int x1 = TileX(tile) * TILE_SIZE;
 
@@ -109,7 +109,7 @@ public:
 
	 *  Calculates only the cost of given node, adds it to the parent node cost
 
	 *  and stores the result into Node::m_cost member
 
	 */
 
	inline bool PfCalcCost(Node &n, const TrackFollower *tf)
 
	inline bool PfCalcCost(Node &n, const TrackFollower *)
 
	{
 
		int segment_cost = 0;
 
		uint tiles = 0;
 
@@ -202,7 +202,7 @@ public:
 
		return IsRoadDepotTile(n.m_segment_last_tile);
 
	}
 

	
 
	inline bool PfDetectDestinationTile(TileIndex tile, Trackdir trackdir)
 
	inline bool PfDetectDestinationTile(TileIndex tile, Trackdir)
 
	{
 
		return IsRoadDepotTile(tile);
 
	}
src/rail_cmd.cpp
Show inline comments
 
@@ -2566,7 +2566,7 @@ void DrawTrainDepotSprite(int x, int y, 
 
	DrawRailTileSeqInGUI(x, y, dts, offset, 0, palette);
 
}
 

	
 
static int GetSlopePixelZ_Track(TileIndex tile, uint x, uint y, bool ground_vehicle)
 
static int GetSlopePixelZ_Track(TileIndex tile, uint x, uint y, bool)
 
{
 
	if (IsPlainRail(tile)) {
 
		int z;
 
@@ -2709,7 +2709,7 @@ set_ground:
 
}
 

	
 

	
 
static TrackStatus GetTileTrackStatus_Track(TileIndex tile, TransportType mode, uint sub_mode, DiagDirection side)
 
static TrackStatus GetTileTrackStatus_Track(TileIndex tile, TransportType mode, uint, DiagDirection side)
 
{
 
	/* Case of half tile slope with water. */
 
	if (mode == TRANSPORT_WATER && IsPlainRail(tile) && GetRailGroundType(tile) == RAIL_GROUND_WATER && IsSlopeWithOneCornerRaised(GetTileSlope(tile))) {
 
@@ -3034,7 +3034,7 @@ static CommandCost TestAutoslopeOnRailTi
 
/**
 
 * Test-procedure for HasVehicleOnPos to check for a ship.
 
 */
 
static Vehicle *EnsureNoShipProc(Vehicle *v, void *data)
 
static Vehicle *EnsureNoShipProc(Vehicle *v, void *)
 
{
 
	return v->type == VEH_SHIP ? v : nullptr;
 
}
src/rail_gui.cpp
Show inline comments
 
@@ -89,7 +89,7 @@ static bool IsStationAvailable(const Sta
 
	return Convert8bitBooleanCallback(statspec->grf_prop.grffile, CBID_STATION_AVAILABILITY, cb_res);
 
}
 

	
 
void CcPlaySound_CONSTRUCTION_RAIL(Commands cmd, const CommandCost &result, TileIndex tile)
 
void CcPlaySound_CONSTRUCTION_RAIL(Commands, const CommandCost &result, TileIndex tile)
 
{
 
	if (result.Succeeded() && _settings_client.sound.confirm) SndPlayTileFx(SND_20_CONSTRUCTION_RAIL, tile);
 
}
 
@@ -135,7 +135,7 @@ static const DiagDirection _place_depot_
 
	DIAGDIR_NW, DIAGDIR_NE, DIAGDIR_NW, DIAGDIR_NE,
 
};
 

	
 
void CcRailDepot(Commands cmd, const CommandCost &result, TileIndex tile, RailType rt, DiagDirection dir)
 
void CcRailDepot(Commands, const CommandCost &result, TileIndex tile, RailType, DiagDirection dir)
 
{
 
	if (result.Failed()) return;
 

	
 
@@ -174,7 +174,7 @@ static void PlaceRail_Waypoint(TileIndex
 
	}
 
}
 

	
 
void CcStation(Commands cmd, const CommandCost &result, TileIndex tile)
 
void CcStation(Commands, const CommandCost &result, TileIndex tile)
 
{
 
	if (result.Failed()) return;
 

	
 
@@ -273,7 +273,7 @@ static void PlaceRail_Bridge(TileIndex t
 
}
 

	
 
/** Command callback for building a tunnel */
 
void CcBuildRailTunnel(Commands cmd, const CommandCost &result, TileIndex tile)
 
void CcBuildRailTunnel(Commands, const CommandCost &result, TileIndex tile)
 
{
 
	if (result.Succeeded()) {
 
		if (_settings_client.sound.confirm) SndPlayTileFx(SND_20_CONSTRUCTION_RAIL, tile);
 
@@ -502,7 +502,7 @@ struct BuildRailToolbarWindow : Window {
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		if (widget < WID_RAT_BUILD_NS) return;
 

	
 
@@ -599,7 +599,7 @@ struct BuildRailToolbarWindow : Window {
 
		return Window::OnHotkey(hotkey);
 
	}
 

	
 
	void OnPlaceObject(Point pt, TileIndex tile) override
 
	void OnPlaceObject([[maybe_unused]] Point pt, TileIndex tile) override
 
	{
 
		switch (this->last_user_action) {
 
			case WID_RAT_BUILD_NS:
 
@@ -658,7 +658,7 @@ struct BuildRailToolbarWindow : Window {
 
		}
 
	}
 

	
 
	void OnPlaceDrag(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt) override
 
	void OnPlaceDrag(ViewportPlaceMethod select_method, [[maybe_unused]] ViewportDragDropSelectionProcess select_proc, [[maybe_unused]] Point pt) override
 
	{
 
		/* no dragging if you have pressed the convert button */
 
		if (FindWindowById(WC_BUILD_SIGNAL, 0) != nullptr && _convert_signal_button && this->IsWidgetLowered(WID_RAT_BUILD_SIGNALS)) return;
 
@@ -666,7 +666,7 @@ struct BuildRailToolbarWindow : Window {
 
		VpSelectTilesWithMethod(pt.x, pt.y, select_method);
 
	}
 

	
 
	void OnPlaceMouseUp(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile) override
 
	void OnPlaceMouseUp([[maybe_unused]] ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, [[maybe_unused]] Point pt, TileIndex start_tile, TileIndex end_tile) override
 
	{
 
		if (pt.x != -1) {
 
			switch (select_proc) {
 
@@ -746,7 +746,7 @@ struct BuildRailToolbarWindow : Window {
 
		CloseWindowByClass(WC_BUILD_BRIDGE);
 
	}
 

	
 
	void OnPlacePresize(Point pt, TileIndex tile) override
 
	void OnPlacePresize([[maybe_unused]] Point pt, TileIndex tile) override
 
	{
 
		Command<CMD_BUILD_TUNNEL>::Do(DC_AUTO, tile, TRANSPORT_RAIL, _cur_railtype);
 
		VpSetPresizeRange(tile, _build_tunnel_endtile == 0 ? tile : _build_tunnel_endtile);
 
@@ -759,7 +759,7 @@ struct BuildRailToolbarWindow : Window {
 
		return ES_NOT_HANDLED;
 
	}
 

	
 
	void OnRealtimeTick(uint delta_ms) override
 
	void OnRealtimeTick([[maybe_unused]] uint delta_ms) override
 
	{
 
		if (this->IsWidgetLowered(WID_RAT_BUILD_WAYPOINT)) CheckRedrawWaypointCoverage(this);
 
	}
 
@@ -1105,7 +1105,7 @@ public:
 
		_railstation.station_class = station_class;
 
	}
 

	
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 

	
 
@@ -1183,7 +1183,7 @@ public:
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_BRAS_NEWST_LIST: {
 
@@ -1320,7 +1320,7 @@ public:
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (GB(widget, 0, 16)) {
 
			case WID_BRAS_PLATFORM_DIR_X:
 
@@ -1487,7 +1487,7 @@ public:
 
		}
 
	}
 

	
 
	void OnRealtimeTick(uint delta_ms) override
 
	void OnRealtimeTick([[maybe_unused]] uint delta_ms) override
 
	{
 
		CheckRedrawStationCoverage(this);
 
	}
 
@@ -1718,7 +1718,7 @@ public:
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		if (widget == WID_BS_DRAG_SIGNALS_DENSITY_LABEL) {
 
			/* Two digits for signals density. */
 
@@ -1752,7 +1752,7 @@ public:
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_BS_SEMAPHORE_NORM:
 
@@ -1818,7 +1818,7 @@ public:
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 
		this->LowerWidget((_cur_signal_variant == SIG_ELECTRIC ? WID_BS_ELECTRIC_NORM : WID_BS_SEMAPHORE_NORM) + _cur_signal_type);
 
@@ -1907,7 +1907,7 @@ struct BuildRailDepotWindow : public Pic
 
		this->LowerWidget(_build_depot_direction + WID_BRAD_DEPOT_NE);
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		if (!IsInsideMM(widget, WID_BRAD_DEPOT_NE, WID_BRAD_DEPOT_NW + 1)) return;
 

	
 
@@ -1928,7 +1928,7 @@ struct BuildRailDepotWindow : public Pic
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_BRAD_DEPOT_NE:
 
@@ -2072,7 +2072,7 @@ struct BuildRailWaypointWindow : PickerW
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_BRW_WAYPOINT_MATRIX:
 
@@ -2135,7 +2135,7 @@ struct BuildRailWaypointWindow : PickerW
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (GB(widget, 0, 16)) {
 
			case WID_BRW_WAYPOINT: {
 
@@ -2156,7 +2156,7 @@ struct BuildRailWaypointWindow : PickerW
 
		}
 
	}
 

	
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 
		this->list.ForceRebuild();
 
@@ -2170,7 +2170,7 @@ struct BuildRailWaypointWindow : PickerW
 
		}
 
	}
 

	
 
	void OnRealtimeTick(uint delta_ms) override
 
	void OnRealtimeTick([[maybe_unused]] uint delta_ms) override
 
	{
 
		CheckRedrawWaypointCoverage(this);
 
	}
 
@@ -2291,9 +2291,8 @@ static void SetDefaultRailGui()
 
/**
 
 * Updates the current signal variant used in the signal GUI
 
 * to the one adequate to current year.
 
 * @param new_value needed to be called when a setting changes
 
 */
 
void ResetSignalVariant(int32_t new_value)
 
void ResetSignalVariant(int32_t)
 
{
 
	SignalVariant new_variant = (TimerGameCalendar::year < _settings_client.gui.semaphore_build_before ? SIG_SEMAPHORE : SIG_ELECTRIC);
 

	
src/road_cmd.cpp
Show inline comments
 
@@ -1905,7 +1905,7 @@ void UpdateNearestTownForRoadTiles(bool 
 
	}
 
}
 

	
 
static int GetSlopePixelZ_Road(TileIndex tile, uint x, uint y, bool ground_vehicle)
 
static int GetSlopePixelZ_Road(TileIndex tile, uint x, uint y, bool)
 
{
 

	
 
	if (IsNormalRoad(tile)) {
 
@@ -2222,7 +2222,7 @@ static const byte _roadveh_enter_depot_d
 
	TRACKDIR_X_SW, TRACKDIR_Y_NW, TRACKDIR_X_NE, TRACKDIR_Y_SE
 
};
 

	
 
static VehicleEnterTileStatus VehicleEnter_Road(Vehicle *v, TileIndex tile, int x, int y)
 
static VehicleEnterTileStatus VehicleEnter_Road(Vehicle *v, TileIndex tile, int, int)
 
{
 
	switch (GetRoadTileType(tile)) {
 
		case ROAD_TILE_DEPOT: {
src/road_gui.cpp
Show inline comments
 
@@ -98,7 +98,7 @@ static bool IsRoadStopAvailable(const Ro
 
	return Convert8bitBooleanCallback(roadstopspec->grf_prop.grffile, CBID_STATION_AVAILABILITY, cb_res);
 
}
 

	
 
void CcPlaySound_CONSTRUCTION_OTHER(Commands cmd, const CommandCost &result, TileIndex tile)
 
void CcPlaySound_CONSTRUCTION_OTHER(Commands, const CommandCost &result, TileIndex tile)
 
{
 
	if (result.Succeeded() && _settings_client.sound.confirm) SndPlayTileFx(SND_1F_CONSTRUCTION_OTHER, tile);
 
}
 
@@ -121,11 +121,10 @@ static void PlaceRoad_Bridge(TileIndex t
 
/**
 
 * Callback executed after a build road tunnel command has been called.
 
 *
 
 * @param cmd unused
 
 * @param result Whether the build succeeded.
 
 * @param start_tile Starting tile of the tunnel.
 
 */
 
void CcBuildRoadTunnel(Commands cmd, const CommandCost &result, TileIndex start_tile)
 
void CcBuildRoadTunnel(Commands, const CommandCost &result, TileIndex start_tile)
 
{
 
	if (result.Succeeded()) {
 
		if (_settings_client.sound.confirm) SndPlayTileFx(SND_1F_CONSTRUCTION_OTHER, start_tile);
 
@@ -158,7 +157,7 @@ void ConnectRoadToStructure(TileIndex ti
 
	}
 
}
 

	
 
void CcRoadDepot(Commands cmd, const CommandCost &result, TileIndex tile, RoadType rt, DiagDirection dir)
 
void CcRoadDepot(Commands, const CommandCost &result, TileIndex tile, RoadType, DiagDirection dir)
 
{
 
	if (result.Failed()) return;
 

	
 
@@ -169,7 +168,6 @@ void CcRoadDepot(Commands cmd, const Com
 

	
 
/**
 
 * Command callback for building road stops.
 
 * @param cmd Unused.
 
 * @param result Result of the build road stop command.
 
 * @param tile Start tile.
 
 * @param width Width of the road stop.
 
@@ -180,7 +178,7 @@ void CcRoadDepot(Commands cmd, const Com
 
 * @param spec_index Road stop spec index.
 
 * @see CmdBuildRoadStop
 
 */
 
void CcRoadStop(Commands cmd, const CommandCost &result, TileIndex tile, uint8_t width, uint8_t length, RoadStopType, bool is_drive_through,
 
void CcRoadStop(Commands, const CommandCost &result, TileIndex tile, uint8_t width, uint8_t length, RoadStopType, bool is_drive_through,
 
		DiagDirection dir, RoadType, RoadStopClassID spec_class, uint16_t spec_index, StationID, bool)
 
{
 
	if (result.Failed()) return;
 
@@ -341,7 +339,7 @@ struct BuildRoadToolbarWindow : Window {
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 
		RoadTramType rtt = GetRoadTramType(this->roadtype);
 
@@ -472,7 +470,7 @@ struct BuildRoadToolbarWindow : Window {
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		_remove_button_clicked = false;
 
		_one_way_button_clicked = false;
 
@@ -560,7 +558,7 @@ struct BuildRoadToolbarWindow : Window {
 
		return Window::OnHotkey(hotkey);
 
	}
 

	
 
	void OnPlaceObject(Point pt, TileIndex tile) override
 
	void OnPlaceObject([[maybe_unused]] Point pt, TileIndex tile) override
 
	{
 
		_remove_button_clicked = this->IsWidgetLowered(WID_ROT_REMOVE);
 
		_one_way_button_clicked = RoadTypeIsRoad(this->roadtype) ? this->IsWidgetLowered(WID_ROT_ONE_WAY) : false;
 
@@ -638,7 +636,7 @@ struct BuildRoadToolbarWindow : Window {
 
		CloseWindowByClass(WC_BUILD_BRIDGE);
 
	}
 

	
 
	void OnPlaceDrag(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt) override
 
	void OnPlaceDrag(ViewportPlaceMethod select_method, [[maybe_unused]] ViewportDragDropSelectionProcess select_proc, [[maybe_unused]] Point pt) override
 
	{
 
		/* Here we update the end tile flags
 
		 * of the road placement actions.
 
@@ -677,7 +675,7 @@ struct BuildRoadToolbarWindow : Window {
 
		VpSelectTilesWithMethod(pt.x, pt.y, select_method);
 
	}
 

	
 
	void OnPlaceMouseUp(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile) override
 
	void OnPlaceMouseUp([[maybe_unused]] ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, [[maybe_unused]] Point pt, TileIndex start_tile, TileIndex end_tile) override
 
	{
 
		if (pt.x != -1) {
 
			switch (select_proc) {
 
@@ -737,7 +735,7 @@ struct BuildRoadToolbarWindow : Window {
 
		}
 
	}
 

	
 
	void OnPlacePresize(Point pt, TileIndex tile) override
 
	void OnPlacePresize([[maybe_unused]] Point pt, TileIndex tile) override
 
	{
 
		Command<CMD_BUILD_TUNNEL>::Do(DC_AUTO, tile, TRANSPORT_ROAD, _cur_roadtype);
 
		VpSetPresizeRange(tile, _build_tunnel_endtile == 0 ? tile : _build_tunnel_endtile);
 
@@ -1018,7 +1016,7 @@ struct BuildRoadDepotWindow : public Pic
 
		this->FinishInitNested(TRANSPORT_ROAD);
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		if (!IsInsideMM(widget, WID_BROD_DEPOT_NE, WID_BROD_DEPOT_NW + 1)) return;
 

	
 
@@ -1039,7 +1037,7 @@ struct BuildRoadDepotWindow : public Pic
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_BROD_DEPOT_NW:
 
@@ -1290,7 +1288,7 @@ public:
 
		}
 
	}
 

	
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
 
	{
 
		if (!gui_scope) return;
 

	
 
@@ -1344,7 +1342,7 @@ public:
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
	void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
 
	{
 
		switch (widget) {
 
			case WID_BROS_NEWST_LIST: {
 
@@ -1492,7 +1490,7 @@ public:
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
 
	{
 
		switch (GB(widget, 0, 16)) {
 
			case WID_BROS_STATION_NE:
 
@@ -1570,7 +1568,7 @@ public:
 
		}
 
	}
 

	
 
	void OnRealtimeTick(uint delta_ms) override
 
	void OnRealtimeTick([[maybe_unused]] uint delta_ms) override
 
	{
 
		CheckRedrawStationCoverage(this);
 
	}
src/roadveh.h
Show inline comments
 
@@ -166,7 +166,7 @@ protected: // These functions should not
 
	 * Returns a value if this articulated part is powered.
 
	 * @return Zero, because road vehicles don't have powered parts.
 
	 */
 
	inline uint16_t GetPoweredPartPower(const RoadVehicle *head) const
 
	inline uint16_t GetPoweredPartPower(const RoadVehicle *) const
 
	{
 
		return 0;
 
	}
src/saveload/game_sl.cpp
Show inline comments
 
@@ -34,7 +34,7 @@ static const SaveLoad _game_script_desc[
 
	    SLEG_VAR("is_random", _game_saveload_is_random,   SLE_BOOL),
 
};
 

	
 
static void SaveReal_GSDT(int *index_ptr)
 
static void SaveReal_GSDT(int *)
 
{
 
	GameConfig *config = GameConfig::GetConfig();
 

	

Changeset was too big and was cut off... Show full diff anyway

0 comments (0 inline, 0 general)