Merge branch 'master' into jgrpp-beta

# Conflicts:
#	.github/workflows/commit-checker.yml
#	src/company_cmd.cpp
#	src/console_cmds.cpp
#	src/crashlog.cpp
#	src/lang/english.txt
#	src/lang/german.txt
#	src/lang/indonesian.txt
#	src/lang/japanese.txt
#	src/lang/korean.txt
#	src/lang/swedish.txt
#	src/linkgraph/linkgraphjob.cpp
#	src/linkgraph/mcf.cpp
#	src/network/core/tcp.cpp
#	src/network/core/tcp.h
#	src/network/core/tcp_game.h
#	src/network/core/udp.h
#	src/network/network.cpp
#	src/network/network_admin.cpp
#	src/network/network_admin.h
#	src/network/network_chat_gui.cpp
#	src/network/network_client.cpp
#	src/network/network_client.h
#	src/network/network_func.h
#	src/network/network_internal.h
#	src/network/network_server.cpp
#	src/network/network_server.h
#	src/newgrf.cpp
#	src/newgrf_station.cpp
#	src/order_gui.cpp
#	src/rail_cmd.cpp
#	src/saveload/saveload.cpp
#	src/settings.cpp
#	src/settings_gui.cpp
#	src/settings_internal.h
#	src/settings_type.h
#	src/station_cmd.cpp
#	src/stdafx.h
#	src/table/currency_settings.ini
#	src/table/misc_settings.ini
#	src/table/settings.h.preamble
#	src/table/settings.ini
#	src/terraform_cmd.cpp
#	src/timetable_gui.cpp
#	src/train_cmd.cpp
#	src/tree_cmd.cpp
#	src/water_cmd.cpp
This commit is contained in:
Jonathan G Rennison
2021-09-27 22:47:13 +01:00
204 changed files with 1829 additions and 1549 deletions

View File

@@ -496,7 +496,7 @@ public:
* Get the current size of the component.
* @return Size.
*/
inline uint Size() const { return (uint)this->nodes.size(); }
inline NodeID Size() const { return (NodeID)this->nodes.size(); }
/**
* Get date of last compression.

View File

@@ -103,7 +103,7 @@ void LinkGraphJob::FinaliseJob()
/* Link graph has been merged into another one. */
if (!LinkGraph::IsValidID(this->link_graph.index)) return;
uint size = this->Size();
uint16 size = this->Size();
for (NodeID node_id = 0; node_id < size; ++node_id) {
Node from = (*this)[node_id];

View File

@@ -364,7 +364,7 @@ public:
* Get the size of the underlying link graph.
* @return Size.
*/
inline uint Size() const { return this->link_graph.Size(); }
inline NodeID Size() const { return this->link_graph.Size(); }
/**
* Get the cargo of the underlying link graph.

View File

@@ -247,7 +247,7 @@ void LinkGraphJobGroup::SpawnThread()
* On the other hand, if you want to play games which make this hang noticably
* on a platform without threads then you'll probably get other problems first.
* OK:
* If someone comes and tells me that this hangs for him/her, I'll implement a
* If someone comes and tells me that this hangs for them, I'll implement a
* smaller grained "Step" method for all handlers and add some more ticks where
* "Step" is called. No problem in principle. */
LinkGraphJobGroup::Run(this);

View File

@@ -502,7 +502,7 @@ bool MCF1stPass::EliminateCycles(PathVector &path, NodeID origin_id, NodeID next
bool MCF1stPass::EliminateCycles()
{
bool cycles_found = false;
uint size = this->job.Size();
uint16 size = this->job.Size();
PathVector path(size, nullptr);
for (NodeID node = 0; node < size; ++node) {
/* Starting at each node in the graph find all cycles involving this
@@ -520,7 +520,7 @@ bool MCF1stPass::EliminateCycles()
MCF1stPass::MCF1stPass(LinkGraphJob &job) : MultiCommodityFlow(job)
{
PathVector paths;
uint size = job.Size();
uint16 size = job.Size();
uint accuracy = job.Settings().accuracy;
bool more_loops;
std::vector<bool> finished_sources(size);
@@ -569,7 +569,7 @@ MCF2ndPass::MCF2ndPass(LinkGraphJob &job) : MultiCommodityFlow(job)
{
this->max_saturation = UINT_MAX; // disable artificial cap on saturation
PathVector paths;
uint size = job.Size();
uint16 size = job.Size();
uint accuracy = job.Settings().accuracy;
bool demand_left = true;
std::vector<bool> finished_sources(size);