Codechange: rename CargoID to CargoType and amend related variables/comments

This commit is contained in:
Rubidium
2025-01-22 18:08:59 +01:00
committed by rubidium42
parent d05cc2ef92
commit e894a5880c
129 changed files with 1009 additions and 1009 deletions

View File

@@ -86,7 +86,7 @@ void LinkGraphOverlay::RebuildCache()
StationLinkMap &seen_links = this->cached_links[from];
uint supply = 0;
for (CargoID c : SetCargoBitIterator(this->cargo_mask)) {
for (CargoType c : SetCargoBitIterator(this->cargo_mask)) {
if (!CargoSpec::Get(c)->IsValid()) continue;
if (!LinkGraph::IsValidID(sta->goods[c].link_graph)) continue;
const LinkGraph &lg = *LinkGraph::Get(sta->goods[c].link_graph);
@@ -212,7 +212,7 @@ inline bool LinkGraphOverlay::IsLinkVisible(Point pta, Point ptb, const DrawPixe
*/
void LinkGraphOverlay::AddLinks(const Station *from, const Station *to)
{
for (CargoID c : SetCargoBitIterator(this->cargo_mask)) {
for (CargoType c : SetCargoBitIterator(this->cargo_mask)) {
if (!CargoSpec::Get(c)->IsValid()) continue;
const GoodsEntry &ge = from->goods[c];
if (!LinkGraph::IsValidID(ge.link_graph) ||
@@ -241,7 +241,7 @@ void LinkGraphOverlay::AddLinks(const Station *from, const Station *to)
* @param new_shared If the new link is shared.
* @param cargo LinkProperties to write the information to.
*/
/* static */ void LinkGraphOverlay::AddStats(CargoID new_cargo, uint new_cap, uint new_usg, uint new_plan, uint32_t time, bool new_shared, LinkProperties &cargo)
/* static */ void LinkGraphOverlay::AddStats(CargoType new_cargo, uint new_cap, uint new_usg, uint new_plan, uint32_t time, bool new_shared, LinkProperties &cargo)
{
/* multiply the numbers by 32 in order to avoid comparing to 0 too often. */
if (cargo.capacity == 0 ||