Merge branch 'master' into jgrpp
# Conflicts: # cmake/CompileFlags.cmake # src/3rdparty/squirrel/squirrel/sqclosure.h # src/3rdparty/squirrel/squirrel/sqobject.h # src/3rdparty/squirrel/squirrel/sqvm.h # src/aircraft.h # src/airport_gui.cpp # src/blitter/32bpp_sse_func.hpp # src/blitter/null.hpp # src/bridge_gui.cpp # src/build_vehicle_gui.cpp # src/cargotype.h # src/cheat_gui.cpp # src/command.cpp # src/command_func.h # src/company_gui.cpp # src/console_gui.cpp # src/date_gui.cpp # src/depot_gui.cpp # src/dock_gui.cpp # src/economy.cpp # src/error_gui.cpp # src/fileio.cpp # src/fios.cpp # src/fios_gui.cpp # src/fontcache/spritefontcache.h # src/framerate_gui.cpp # src/game/game_text.cpp # src/gamelog.cpp # src/genworld_gui.cpp # src/gfx_layout_fallback.cpp # src/group_gui.cpp # src/highscore_gui.cpp # src/hotkeys.cpp # src/industry_cmd.cpp # src/industry_gui.cpp # src/landscape.cpp # src/main_gui.cpp # src/misc_cmd.cpp # src/misc_gui.cpp # src/network/core/tcp_game.cpp # src/network/core/udp.cpp # src/network/network_chat_gui.cpp # src/network/network_content_gui.cpp # src/network/network_gui.cpp # src/network/network_server.cpp # src/network/network_server.h # src/newgrf_airport.cpp # src/newgrf_airport.h # src/newgrf_airporttiles.cpp # src/newgrf_airporttiles.h # src/newgrf_animation_base.h # src/newgrf_canal.cpp # src/newgrf_commons.h # src/newgrf_config.cpp # src/newgrf_debug_gui.cpp # src/newgrf_engine.cpp # src/newgrf_engine.h # src/newgrf_generic.cpp # src/newgrf_gui.cpp # src/newgrf_house.cpp # src/newgrf_house.h # src/newgrf_industries.cpp # src/newgrf_industries.h # src/newgrf_industrytiles.cpp # src/newgrf_industrytiles.h # src/newgrf_object.cpp # src/newgrf_object.h # src/newgrf_railtype.cpp # src/newgrf_railtype.h # src/newgrf_roadstop.cpp # src/newgrf_roadstop.h # src/newgrf_roadtype.cpp # src/newgrf_roadtype.h # src/newgrf_spritegroup.cpp # src/newgrf_spritegroup.h # src/newgrf_station.cpp # src/newgrf_station.h # src/newgrf_town.cpp # src/newgrf_town.h # src/news_gui.cpp # src/object_gui.cpp # src/order_gui.cpp # src/os/macosx/crashlog_osx.cpp # src/os/unix/crashlog_unix.cpp # src/os/windows/crashlog_win.cpp # src/os/windows/win32.cpp # src/os/windows/win32_main.cpp # src/pathfinder/npf/npf.cpp # src/pathfinder/npf/queue.cpp # src/rail_cmd.cpp # src/rail_gui.cpp # src/road_gui.cpp # src/roadveh.h # src/saveload/saveload.cpp # src/screenshot.cpp # src/script/api/script_text.hpp # src/settings.cpp # src/settings_gui.cpp # src/settings_internal.h # src/settings_table.cpp # src/signs_cmd.cpp # src/signs_gui.cpp # src/smallmap_gui.cpp # src/smallmap_gui.h # src/spriteloader/grf.hpp # src/station_cmd.cpp # src/station_gui.cpp # src/station_map.h # src/statusbar_gui.cpp # src/stdafx.h # src/strgen/strgen.cpp # src/table/newgrf_debug_data.h # src/terraform_gui.cpp # src/timer/timer_game_calendar.cpp # src/timer/timer_window.cpp # src/town.h # src/town_cmd.cpp # src/town_gui.cpp # src/train_gui.cpp # src/transparency_gui.cpp # src/vehicle_gui.cpp # src/water_cmd.cpp # src/waypoint_cmd.cpp # src/widget.cpp # src/widget_type.h # src/widgets/dropdown.cpp # src/widgets/rail_widget.h # src/widgets/terraform_widget.h # src/window.cpp # src/window_gui.h
This commit is contained in:
@@ -36,7 +36,7 @@ public:
|
||||
* Call the demand calculator on the given component.
|
||||
* @param job Component to calculate the demands for.
|
||||
*/
|
||||
virtual void Run(LinkGraphJob &job) const { DemandCalculator c(job); }
|
||||
void Run(LinkGraphJob &job) const override { DemandCalculator c(job); }
|
||||
|
||||
/**
|
||||
* Virtual destructor has to be defined because of virtual Run().
|
||||
|
@@ -28,7 +28,7 @@ public:
|
||||
* values. Only do that on the very last flow mapping.
|
||||
*/
|
||||
FlowMapper(bool scale) : scale(scale) {}
|
||||
virtual void Run(LinkGraphJob &job) const;
|
||||
void Run(LinkGraphJob &job) const override;
|
||||
|
||||
private:
|
||||
|
||||
|
@@ -16,7 +16,7 @@ public:
|
||||
* Initialize the link graph job.
|
||||
* @param job Job to be initialized.
|
||||
*/
|
||||
virtual void Run(LinkGraphJob &job) const { job.Init(); }
|
||||
void Run(LinkGraphJob &job) const override { job.Init(); }
|
||||
};
|
||||
|
||||
#endif /* INIT_H */
|
||||
|
@@ -306,7 +306,7 @@ public:
|
||||
}
|
||||
|
||||
/** Bare constructor, only for save/load. */
|
||||
LinkGraph() : cargo(INVALID_CARGO), last_compression(0) {}
|
||||
LinkGraph() : cargo(CT_INVALID), last_compression(0) {}
|
||||
/**
|
||||
* Real constructor.
|
||||
* @param cargo Cargo the link graph is about.
|
||||
|
@@ -760,7 +760,7 @@ void LinkGraphLegendWindow::SetOverlay(LinkGraphOverlay *overlay) {
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
@@ -819,7 +819,7 @@ void LinkGraphLegendWindow::DrawWidget(const Rect &r, int widget) const
|
||||
}
|
||||
}
|
||||
|
||||
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)) {
|
||||
@@ -867,7 +867,7 @@ void LinkGraphLegendWindow::UpdateOverlayCargoes()
|
||||
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)) {
|
||||
@@ -899,7 +899,7 @@ void LinkGraphLegendWindow::OnClick(Point pt, int widget, int click_count)
|
||||
* @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();
|
||||
|
@@ -128,10 +128,10 @@ public:
|
||||
LinkGraphLegendWindow(WindowDesc *desc, int window_number);
|
||||
void SetOverlay(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:
|
||||
|
@@ -129,10 +129,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)
|
||||
{
|
||||
Node node_anno = this->job[node];
|
||||
this->i = node_anno.GetEdges().begin();
|
||||
@@ -232,7 +231,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
|
||||
|
@@ -81,7 +81,7 @@ public:
|
||||
* Run the calculation.
|
||||
* @param graph Component to be calculated.
|
||||
*/
|
||||
virtual void Run(LinkGraphJob &job) const { Tpass pass(job); }
|
||||
void Run(LinkGraphJob &job) const override { Tpass pass(job); }
|
||||
};
|
||||
|
||||
#endif /* MCF_H */
|
||||
|
Reference in New Issue
Block a user