Fix a bunch more compile warnings
This commit is contained in:
@@ -576,7 +576,7 @@ void BlueprintCopyArea(TileIndex start, TileIndex end) {
|
||||
_active_blueprint = std::make_pair(start, blueprint);
|
||||
}
|
||||
|
||||
void UpdateBlueprintTileSelection(Point pt, TileIndex tile) {
|
||||
void UpdateBlueprintTileSelection(TileIndex tile) {
|
||||
if (_active_blueprint.second == nullptr) {
|
||||
_thd.cm_new = ObjectHighlight{};
|
||||
return;
|
||||
@@ -642,7 +642,7 @@ void BuildBlueprint(sp<Blueprint> &blueprint, TileIndex start) {
|
||||
}
|
||||
|
||||
if (last_rail != nullptr) { // there can't be any signals if there are no rails
|
||||
last_rail->with_callback([start, blueprint](bool res) {
|
||||
last_rail->with_callback([start, blueprint]([[maybe_unused]] bool res) {
|
||||
for (auto &item : blueprint->items) {
|
||||
if (item.type != Blueprint::Item::Type::RAIL_SIGNAL) continue;
|
||||
auto cc = GetBlueprintCommand(start, item);
|
||||
|
||||
@@ -12,7 +12,7 @@ void ResetActiveBlueprint();
|
||||
void SetBlueprintHighlight(const TileInfo *ti, TileHighlight &th);
|
||||
|
||||
|
||||
void UpdateBlueprintTileSelection(Point pt, TileIndex tile);
|
||||
void UpdateBlueprintTileSelection(TileIndex tile);
|
||||
void BuildActiveBlueprint(TileIndex start);
|
||||
void RotateActiveBlueprint();
|
||||
void SaveBlueprint(uint slot);
|
||||
|
||||
@@ -54,13 +54,13 @@ struct CargosWindow : Window {
|
||||
SetDParam(1, (CompanyID)this->window_number);
|
||||
}
|
||||
|
||||
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_CT_HEADER_CARGO) return;
|
||||
this->cargoPeriod = (this->cargoPeriod == WID_CT_OPTION_CARGO_TOTAL) ? WID_CT_OPTION_CARGO_MONTH : WID_CT_OPTION_CARGO_TOTAL;
|
||||
this->SetDirty();
|
||||
}
|
||||
|
||||
void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, Dimension *fill, Dimension *resize) {
|
||||
void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override {
|
||||
Dimension icon_size = this->GetMaxIconSize();
|
||||
int line_height = std::max(GetCharacterHeight(FS_NORMAL), (int)icon_size.height);
|
||||
int icon_space = icon_size.width + ScaleGUITrad(CT_ICON_MARGIN);
|
||||
@@ -68,17 +68,15 @@ struct CargosWindow : Window {
|
||||
case WID_CT_HEADER_AMOUNT:
|
||||
case WID_CT_HEADER_INCOME:
|
||||
case WID_CT_AMOUNT:
|
||||
case WID_CT_INCOME: {
|
||||
case WID_CT_INCOME:
|
||||
break;
|
||||
}
|
||||
case WID_CT_HEADER_CARGO:
|
||||
case WID_CT_LIST: {
|
||||
case WID_CT_LIST:
|
||||
for (const CargoSpec *cs : _sorted_standard_cargo_specs) {
|
||||
size->width = std::max(GetStringBoundingBox(cs->name).width + icon_space, size->width);
|
||||
}
|
||||
size->width = std::max(GetStringBoundingBox(CM_STR_TOOLBAR_CARGOS_HEADER_TOTAL_MONTH).width, size->width);
|
||||
break;
|
||||
}
|
||||
}
|
||||
switch(widget) {
|
||||
case WID_CT_HEADER_AMOUNT:
|
||||
@@ -89,15 +87,15 @@ struct CargosWindow : Window {
|
||||
break;
|
||||
case WID_CT_AMOUNT:
|
||||
case WID_CT_INCOME:
|
||||
case WID_CT_LIST: {
|
||||
case WID_CT_LIST:
|
||||
size->height = _sorted_standard_cargo_specs.size() * line_height + CT_LINESPACE + GetCharacterHeight(FS_NORMAL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
size->width += padding.width;
|
||||
size->height += padding.height;
|
||||
}
|
||||
|
||||
Dimension GetMaxIconSize() const {
|
||||
const CargoSpec *cs;
|
||||
Dimension size = {0, 0};
|
||||
for (const CargoSpec *cs : _sorted_standard_cargo_specs) {
|
||||
Dimension icon_size = GetSpriteSize(cs->GetCargoIcon());
|
||||
@@ -107,8 +105,7 @@ struct CargosWindow : Window {
|
||||
return size;
|
||||
}
|
||||
|
||||
void DrawWidget(const Rect &r, int widget) const
|
||||
{
|
||||
void DrawWidget(const Rect &r, int widget) const override {
|
||||
const Company *c = Company::Get((CompanyID)this->window_number);
|
||||
uint32 sum_cargo_amount = 0;
|
||||
Money sum_cargo_income = 0;
|
||||
@@ -137,7 +134,7 @@ struct CargosWindow : Window {
|
||||
y + (line_height - (int)icon_size.height) / 2);
|
||||
|
||||
SetDParam(0, cs->name);
|
||||
DrawString(r.left + icon_space, r.right, y + text_y_ofs, CM_STR_TOOLBAR_CARGOS_NAME);
|
||||
DrawString(rect_x + icon_space, r.right, y + text_y_ofs, CM_STR_TOOLBAR_CARGOS_NAME);
|
||||
|
||||
y += line_height;
|
||||
}
|
||||
|
||||
@@ -25,14 +25,14 @@
|
||||
|
||||
namespace citymania {
|
||||
|
||||
static bool Intersects(PointDimension rect, Point pos, Point size) {
|
||||
return (
|
||||
pos.x + size.x >= rect.x &&
|
||||
pos.x <= rect.x + rect.width &&
|
||||
pos.y + size.y >= rect.y &&
|
||||
pos.y <= rect.y + rect.height
|
||||
);
|
||||
}
|
||||
// static bool Intersects(PointDimension rect, Point pos, Point size) {
|
||||
// return (
|
||||
// pos.x + size.x >= rect.x &&
|
||||
// pos.x <= rect.x + rect.width &&
|
||||
// pos.y + size.y >= rect.y &&
|
||||
// pos.y <= rect.y + rect.height
|
||||
// );
|
||||
// }
|
||||
|
||||
static bool Intersects(PointDimension rect, int left, int top, int right, int bottom) {
|
||||
return (
|
||||
|
||||
@@ -419,7 +419,7 @@ struct CommandsToolbarWindow : Window {
|
||||
const CargoSpec *cs = _sorted_cargo_specs[widget - CTW_CARGO_FIRST];
|
||||
bool rtl = _current_text_dir == TD_RTL;
|
||||
|
||||
/* Since the buttons have no text, no images,
|
||||
/ * Since the buttons have no text, no images,
|
||||
* both the text and the coloured box have to be manually painted.
|
||||
* clk_dif will move one pixel down and one pixel to the right
|
||||
* when the button is clicked */ /*
|
||||
@@ -452,7 +452,7 @@ struct CommandsToolbarWindow : Window {
|
||||
|
||||
};
|
||||
|
||||
/** Construct the row containing the digit keys. *//*
|
||||
/ ** Construct the row containing the digit keys. *//*
|
||||
static NWidgetBase *MakeCargoButtons(int *biggest_index)
|
||||
{
|
||||
NWidgetVertical *ver = new NWidgetVertical;
|
||||
@@ -695,7 +695,7 @@ struct LoginWindow : Window {
|
||||
// if(!_novahost || !_networking) this->DisableWidget(LWW_NOVAPOLIS);
|
||||
}
|
||||
|
||||
virtual void SetStringParameters(int widget) const
|
||||
void SetStringParameters(int widget) const override
|
||||
{
|
||||
switch(widget){
|
||||
case LWW_NOVAPOLIS_LOGIN:
|
||||
@@ -719,7 +719,7 @@ struct LoginWindow : Window {
|
||||
}
|
||||
}
|
||||
|
||||
virtual void OnClick(Point pt, int widget, int click_count)
|
||||
void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
|
||||
{
|
||||
switch (widget) {
|
||||
case LWW_NOVAPOLIS:
|
||||
@@ -746,7 +746,7 @@ struct LoginWindow : Window {
|
||||
}
|
||||
}
|
||||
|
||||
void OnQueryTextFinished(char * str)
|
||||
void OnQueryTextFinished(char * str) override
|
||||
{
|
||||
if (str == NULL) return;
|
||||
switch(this->query_widget){
|
||||
|
||||
@@ -354,7 +354,7 @@ void ObjectHighlight::AddTile(TileIndex tile, ObjectTileHighlight &&oh) {
|
||||
this->tiles.insert(std::make_pair(tile, std::move(oh)));
|
||||
}
|
||||
|
||||
void ObjectHighlight::AddStationOverlayData(TileIndex tile, int w, int h, int rad, StationCoverageType sct) {
|
||||
void ObjectHighlight::AddStationOverlayData(int w, int h, int rad, StationCoverageType sct) {
|
||||
if (!_settings_game.station.modified_catchment) rad = CA_UNMODIFIED;
|
||||
auto production = citymania::GetProductionAroundTiles(this->tile, w, h, rad);
|
||||
bool has_header = false;
|
||||
@@ -444,7 +444,7 @@ void ObjectHighlight::UpdateTiles() {
|
||||
tile_track += tile_delta ^ TileDiffXY(1, 1); // perpendicular to tile_delta
|
||||
} while (--numtracks);
|
||||
|
||||
this->AddStationOverlayData(this->tile, ta.w, ta.h, CA_TRAIN, SCT_ALL);
|
||||
this->AddStationOverlayData(ta.w, ta.h, CA_TRAIN, SCT_ALL);
|
||||
break;
|
||||
}
|
||||
case Type::ROAD_STOP: {
|
||||
@@ -468,7 +468,7 @@ void ObjectHighlight::UpdateTiles() {
|
||||
}
|
||||
auto sct = (this->is_truck ? SCT_NON_PASSENGERS_ONLY : SCT_PASSENGERS_ONLY);
|
||||
auto rad = (this->is_truck ? CA_BUS : CA_TRUCK);
|
||||
this->AddStationOverlayData(this->tile, ta.w, ta.h, rad, sct);
|
||||
this->AddStationOverlayData(ta.w, ta.h, rad, sct);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -502,7 +502,7 @@ void ObjectHighlight::UpdateTiles() {
|
||||
for (AirportTileTableIterator iter(as->table[this->airport_layout], this->tile); iter != INVALID_TILE; ++iter) {
|
||||
this->AddTile(iter, ObjectTileHighlight::make_airport_tile(palette, iter.GetStationGfx()));
|
||||
}
|
||||
this->AddStationOverlayData(this->tile, w, h, as->catchment, SCT_ALL);
|
||||
this->AddStationOverlayData(w, h, as->catchment, SCT_ALL);
|
||||
break;
|
||||
}
|
||||
case Type::BLUEPRINT:
|
||||
@@ -630,7 +630,7 @@ void ObjectHighlight::UpdateOverlay() {
|
||||
return;
|
||||
}
|
||||
auto err = this->cost.GetErrorMessage();
|
||||
auto extra_err = this->cost.GetExtraErrorMessage();
|
||||
// auto extra_err = this->cost.GetExtraErrorMessage();
|
||||
bool no_money = (err == STR_ERROR_NOT_ENOUGH_CASH_REQUIRES_CURRENCY);
|
||||
SetDParam(0, this->cost.GetCost());
|
||||
this->overlay_data.emplace_back(PAL_NONE, GetString(no_money ? CM_STR_BUILD_INFO_OVERLAY_COST_NO_MONEY : CM_STR_BUILD_INFO_OVERLAY_COST_OK));
|
||||
@@ -945,7 +945,7 @@ bool is_same_industry(TileIndex tile, Industry* ind) {
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 GetNearbyIndustryTileInformation(byte parameter, TileIndex tile, Industry* ind, bool signed_offsets, bool grf_version8)
|
||||
uint32 GetNearbyIndustryTileInformation(byte parameter, TileIndex tile, [[maybe_unused]] Industry* ind, bool signed_offsets, bool grf_version8)
|
||||
{
|
||||
if (parameter != 0) tile = GetNearbyTile(parameter, tile, signed_offsets); // only perform if it is required
|
||||
|
||||
@@ -1062,7 +1062,6 @@ bool DrawNewIndustryTile(TileInfo *ti, Industry *i, IndustryGfx gfx, const Indus
|
||||
IndustryTilePreviewResolverObject object(gfx, ti->tile, i);
|
||||
|
||||
const SpriteGroup *group = object.Resolve();
|
||||
auto diff = TileIndexToTileIndexDiffC(ti->tile, i->location.tile);
|
||||
if (group == nullptr || group->type != SGT_TILELAYOUT) return false;
|
||||
|
||||
/* Limit the building stage to the number of stages supplied. */
|
||||
@@ -1344,19 +1343,18 @@ void ObjectHighlight::Draw(const TileInfo *ti) {
|
||||
DrawTileSelectionRect(ti, oth.palette);
|
||||
break;
|
||||
case ObjectTileHighlight::Type::NUMBERED_RECT: {
|
||||
DrawTileSelectionRect(ti, oth.palette);
|
||||
ViewportSign sign;
|
||||
auto string_id = oth.u.numbered_rect.number ? CM_STR_LAYOUT_NUM : CM_STR_LAYOUT_RANDOM;
|
||||
|
||||
SetDParam(0, oth.u.numbered_rect.number);
|
||||
std::string buffer = GetString(string_id);
|
||||
auto bb = GetStringBoundingBox(buffer);
|
||||
sign.width_normal = WidgetDimensions::scaled.fullbevel.left + Align(bb.width, 2) + WidgetDimensions::scaled.fullbevel.right;
|
||||
Point pt = RemapCoords2(TileX(ti->tile) * TILE_SIZE + TILE_SIZE / 2, TileY(ti->tile) * TILE_SIZE + TILE_SIZE / 2);
|
||||
sign.center = pt.x;
|
||||
sign.top = pt.y - bb.height / 2;
|
||||
|
||||
// TODO NUMBERED_RECT should be used atm anyway
|
||||
// DrawTileSelectionRect(ti, oth.palette);
|
||||
// auto string_id = oth.u.numbered_rect.number ? CM_STR_LAYOUT_NUM : CM_STR_LAYOUT_RANDOM;
|
||||
// SetDParam(0, oth.u.numbered_rect.number);
|
||||
// std::string buffer = GetString(string_id);
|
||||
// auto bb = GetStringBoundingBox(buffer);
|
||||
// ViewportSign sign;
|
||||
// sign.width_normal = WidgetDimensions::scaled.fullbevel.left + Align(bb.width, 2) + WidgetDimensions::scaled.fullbevel.right;
|
||||
// Point pt = RemapCoords2(TileX(ti->tile) * TILE_SIZE + TILE_SIZE / 2, TileY(ti->tile) * TILE_SIZE + TILE_SIZE / 2);
|
||||
// sign.center = pt.x;
|
||||
// sign.top = pt.y - bb.height / 2;
|
||||
|
||||
// ViewportAddString(_cur_dpi, ZOOM_LVL_OUT_8X, &sign,
|
||||
// string_id, STR_NULL, STR_NULL, oth.u.numbered_rect.number, 0, COLOUR_WHITE);
|
||||
break;
|
||||
@@ -1387,7 +1385,7 @@ bool Intersects(const Rect &rect, int left, int top, int right, int bottom) {
|
||||
}
|
||||
|
||||
|
||||
void ObjectHighlight::DrawSelectionOverlay(DrawPixelInfo *dpi) {
|
||||
void ObjectHighlight::DrawSelectionOverlay([[maybe_unused]] DrawPixelInfo *dpi) {
|
||||
for (auto &s : this->sprites) {
|
||||
DrawSpriteViewport(s.sprite_id, s.palette_id, s.pt.x, s.pt.y);
|
||||
}
|
||||
@@ -1413,7 +1411,7 @@ void ObjectHighlight::DrawSelectionOverlay(DrawPixelInfo *dpi) {
|
||||
// }
|
||||
}
|
||||
|
||||
void ObjectHighlight::DrawOverlay(DrawPixelInfo *dpi) {
|
||||
void ObjectHighlight::DrawOverlay([[maybe_unused]] DrawPixelInfo *dpi) {
|
||||
if (!this->cost.Succeeded()) return;
|
||||
}
|
||||
|
||||
@@ -1747,7 +1745,7 @@ void DrawTileZoning(const TileInfo *ti, const TileHighlight &th, TileType tile_t
|
||||
}
|
||||
}
|
||||
|
||||
bool DrawTileSelection(const TileInfo *ti, const TileHighlightType &tht) {
|
||||
bool DrawTileSelection(const TileInfo *ti, [[maybe_unused]] const TileHighlightType &tht) {
|
||||
if (ti->tile == INVALID_TILE || IsTileType(ti->tile, MP_VOID)) return false;
|
||||
_thd.cm.Draw(ti);
|
||||
|
||||
@@ -1812,7 +1810,7 @@ HighLightStyle UpdateTileSelection(HighLightStyle new_drawstyle) {
|
||||
bool force_new = false;
|
||||
// fprintf(stderr, "UPDATE %d %d %d %d\n", tile, _thd.size.x, _thd.size.y, (int)((_thd.place_mode & HT_DRAG_MASK) == HT_RECT));
|
||||
if (_thd.place_mode == CM_HT_BLUEPRINT_PLACE) {
|
||||
UpdateBlueprintTileSelection(pt, tile);
|
||||
UpdateBlueprintTileSelection(tile);
|
||||
new_drawstyle = CM_HT_BLUEPRINT_PLACE;
|
||||
} else if (pt.x == -1) {
|
||||
} else if (_thd.make_square_red) {
|
||||
|
||||
@@ -345,7 +345,7 @@ public:
|
||||
void Draw(const TileInfo *ti);
|
||||
void DrawSelectionOverlay(DrawPixelInfo *dpi);
|
||||
void DrawOverlay(DrawPixelInfo *dpi);
|
||||
void AddStationOverlayData(TileIndex tile, int w, int h, int rad, StationCoverageType sct);
|
||||
void AddStationOverlayData(int w, int h, int rad, StationCoverageType sct);
|
||||
void UpdateTiles();
|
||||
void UpdateOverlay();
|
||||
void MarkDirty();
|
||||
|
||||
@@ -121,7 +121,7 @@ ToolRemoveMode RailToolbar_GetRemoveMode(int widget) {
|
||||
}
|
||||
}
|
||||
|
||||
bool RailToolbar_IsRemoveInverted(int widget) {
|
||||
bool RailToolbar_IsRemoveInverted([[maybe_unused]] int widget) {
|
||||
return false;
|
||||
// return (RailToolbar_GetRemoveMode(widget) != ToolRemoveMode::NONE && citymania::_fn_mod);
|
||||
}
|
||||
|
||||
@@ -257,13 +257,11 @@ MinimapIndustryKdtreeEntry get_industry_entry(const Industry *ind) {
|
||||
}
|
||||
|
||||
void minimap_add_industry(const Industry *ind) {
|
||||
auto x = get_industry_entry(ind);
|
||||
if (!is_cached_industry(ind)) return;
|
||||
_minimap_industry_idx.Insert(get_industry_entry(ind));
|
||||
}
|
||||
|
||||
void minimap_remove_industry(const Industry *ind) {
|
||||
auto x = get_industry_entry(ind);
|
||||
if (!is_cached_industry(ind)) return;
|
||||
_minimap_industry_idx.Remove(get_industry_entry(ind));
|
||||
}
|
||||
|
||||
@@ -215,11 +215,7 @@ SpriteID TileZoneCheckBuildEvaluation(TileIndex tile, Owner owner) {
|
||||
//Detect whether a building is unserved by a station of owner.
|
||||
//return red if unserved, orange if only accepting, nothing if served or not a building
|
||||
SpriteID TileZoneCheckUnservedBuildingsEvaluation(TileIndex tile) {
|
||||
CargoArray dat;
|
||||
|
||||
if (IsTileType (tile, MP_HOUSE))
|
||||
//&& ( ( memset(&dat, 0, sizeof(dat)), AddAcceptedCargo(tile, dat, NULL), (dat[CT_MAIL] + dat[CT_PASSENGERS] > 0) )
|
||||
// || ( memset(&dat, 0, sizeof(dat)), AddProducedCargo(tile, dat), (dat[CT_MAIL] + dat[CT_PASSENGERS] > 0) ) ) )
|
||||
{
|
||||
StationFinder stations(TileArea(tile, 1, 1));
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
TileIndex tile;
|
||||
TileIndex end_tile; ///< For use in ruler(dragdrop) mode
|
||||
|
||||
virtual Point OnInitialPosition(int16 sm_width, int16 sm_height, int window_number)
|
||||
Point OnInitialPosition(int16 sm_width, int16 sm_height, [[maybe_unused]] int window_number) override
|
||||
{
|
||||
int scr_top = GetMainViewTop() + 2;
|
||||
int scr_bot = GetMainViewBottom() - 2;
|
||||
|
||||
@@ -337,6 +337,7 @@ static void ToggleRailButton_Remove(Window *w)
|
||||
* @param w window the button belongs to
|
||||
* @return true iff the remove button was changed
|
||||
*/
|
||||
[[maybe_unused]]
|
||||
static bool RailToolbar_CtrlChanged(Window *w)
|
||||
{
|
||||
if (w->IsWidgetDisabled(WID_RAT_REMOVE)) return false;
|
||||
|
||||
@@ -302,6 +302,7 @@ static void ToggleRoadButton_Remove(Window *w)
|
||||
* @param w window the button belongs to
|
||||
* @return true iff the remove button was changed
|
||||
*/
|
||||
[[maybe_unused]]
|
||||
static bool RoadToolbar_CtrlChanged(Window *w)
|
||||
{
|
||||
if (w->IsWidgetDisabled(WID_ROT_REMOVE)) return false;
|
||||
@@ -1113,9 +1114,9 @@ public:
|
||||
* then from a click and that the CTRL state should be ignored. */
|
||||
case BRDHK_ROTATE:
|
||||
if (_road_depot_orientation < DIAGDIR_END) {
|
||||
this->RaiseWidget(_road_depot_orientation + WID_BROD_DEPOT_NE);
|
||||
this->RaiseWidget(WID_BROD_DEPOT_NE + _road_depot_orientation);
|
||||
_road_depot_orientation = ChangeDiagDir(_road_depot_orientation, DIAGDIRDIFF_90RIGHT);
|
||||
this->LowerWidget(_road_depot_orientation + WID_BROD_DEPOT_NE);
|
||||
this->LowerWidget(WID_BROD_DEPOT_NE + _road_depot_orientation);
|
||||
} else {
|
||||
citymania::RotateAutodetection();
|
||||
}
|
||||
@@ -1403,7 +1404,7 @@ public:
|
||||
|
||||
if (hotkey == CM_BROSHK_ROTATE) {
|
||||
if (_roadstop_gui_settings.orientation < citymania::STATIONDIR_AUTO) {
|
||||
this->RaiseWidget(_roadstop_gui_settings.orientation + WID_BROS_STATION_NE);
|
||||
this->RaiseWidget(WID_BROS_STATION_NE + _roadstop_gui_settings.orientation);
|
||||
if (_roadstop_gui_settings.orientation < DIAGDIR_END) {
|
||||
_roadstop_gui_settings.orientation = ChangeDiagDir(_roadstop_gui_settings.orientation, DIAGDIRDIFF_90RIGHT);
|
||||
} else if (_roadstop_gui_settings.orientation == citymania::STATIONDIR_X) {
|
||||
@@ -1411,7 +1412,7 @@ public:
|
||||
} else if (_roadstop_gui_settings.orientation == citymania::STATIONDIR_Y) {
|
||||
_roadstop_gui_settings.orientation = citymania::STATIONDIR_X;
|
||||
}
|
||||
this->LowerWidget(_roadstop_gui_settings.orientation + WID_BROS_STATION_NE);
|
||||
this->LowerWidget(WID_BROS_STATION_NE + _roadstop_gui_settings.orientation);
|
||||
} else {
|
||||
citymania::RotateAutodetection();
|
||||
}
|
||||
|
||||
@@ -1000,7 +1000,7 @@ struct GameOptionsWindow : Window {
|
||||
}
|
||||
}
|
||||
|
||||
static EventState GameOptionsWindowGlobalHotkeys(int hotkey) {
|
||||
static EventState GameOptionsWindowGlobalHotkeys([[maybe_unused]] int hotkey) {
|
||||
if (!ToggleFullScreen(!_fullscreen)) {
|
||||
ShowErrorMessage(STR_ERROR_FULLSCREEN_FAILED, INVALID_STRING_ID, WL_ERROR);
|
||||
}
|
||||
|
||||
@@ -618,12 +618,12 @@ static bool CanChangeTimetableMode(int32_t &)
|
||||
|
||||
// CM
|
||||
#include "statusbar_gui.h"
|
||||
static void cm_v_RedrawStatusBar(int32 new_value) {
|
||||
static void cm_v_RedrawStatusBar([[maybe_unused]] int32 new_value) {
|
||||
// TODO is this function even needed?
|
||||
CM_RedrawStatusBar();
|
||||
}
|
||||
|
||||
static void cm_v_RedrawGraphs(int32 new_value) {
|
||||
static void cm_v_RedrawGraphs([[maybe_unused]] int32 new_value) {
|
||||
InvalidateWindowData(WC_INCOME_GRAPH, 0);
|
||||
InvalidateWindowData(WC_OPERATING_PROFIT, 0);
|
||||
InvalidateWindowData(WC_DELIVERED_CARGO, 0);
|
||||
|
||||
@@ -625,7 +625,7 @@ uint32_t GetSmallMapOwnerPixels(TileIndex tile, TileType t, IncludeHeightmap inc
|
||||
|
||||
static inline uint32 CM_GetSmallMapIMBAPixels(TileIndex tile, TileType t)
|
||||
{
|
||||
const SmallMapColourScheme *cs = &_heightmap_schemes[_settings_client.gui.smallmap_land_colour];
|
||||
// const SmallMapColourScheme *cs = &_heightmap_schemes[_settings_client.gui.smallmap_land_colour];
|
||||
switch (t) {
|
||||
// case MP_TREES:
|
||||
// if (GetTreeGround(tile) == TREE_GROUND_SNOW_DESERT || GetTreeGround(tile) == TREE_GROUND_ROUGH_SNOW) {
|
||||
|
||||
@@ -2159,7 +2159,7 @@ uint CB_GetMaxTownStorage(Town *town, uint cargo) {
|
||||
return CBREQ[cargo] > 0 ? (town->cache.population * CBREQ[cargo] * _cb_storage / 1000) : 0;
|
||||
}
|
||||
|
||||
void CB_UpdateTownStorage(Town *t)
|
||||
void CB_UpdateTownStorage([[maybe_unused]] Town *t)
|
||||
{
|
||||
// InvalidateWindowData(WC_CB_TOWN, t->index);
|
||||
// t->growing = true;
|
||||
|
||||
@@ -3189,7 +3189,6 @@ static void ShowLengthMeasurement(HighLightStyle style, TileIndex start_tile, Ti
|
||||
if (_settings_client.gui.measure_tooltip) {
|
||||
uint distance = DistanceManhattan(start_tile, end_tile) + 1;
|
||||
byte index = 0;
|
||||
uint64 params[2];
|
||||
|
||||
if (show_single_tile_length || distance != 1) {
|
||||
int heightdiff = CalcHeightdiff(style, distance, start_tile, end_tile);
|
||||
|
||||
@@ -141,7 +141,7 @@ public:
|
||||
HandleZoomMessage(this, this->viewport, WID_EV_ZOOM_IN, WID_EV_ZOOM_OUT);
|
||||
}
|
||||
|
||||
virtual void OnMouseOver(Point pt, int widget)
|
||||
void OnMouseOver(Point pt, [[maybe_unused]] int widget) override
|
||||
{
|
||||
extern void GuiPrepareTooltipsExtra(Window *parent);
|
||||
if (pt.x != -1) GuiPrepareTooltipsExtra(this);
|
||||
|
||||
Reference in New Issue
Block a user