Codechange: rename CargoID to CargoType and amend related variables/comments
This commit is contained in:
@@ -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 ||
|
||||
|
||||
Reference in New Issue
Block a user