Changeset - r25522:f57895b89775
[Not reviewed]
master
0 2 0
rubidium42 - 3 years ago 2021-05-26 19:32:43
rubidium@openttd.org
Codechange: linkgraph always iterates with NodeIDs over the Size(), so make Size() the same type to prevent infinite loops
2 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/linkgraph/linkgraph.h
Show inline comments
 
@@ -495,7 +495,7 @@ public:
 
	 * Get the current size of the component.
 
	 * @return Size.
 
	 */
 
	inline uint16 Size() const { return (uint16)this->nodes.size(); }
 
	inline NodeID Size() const { return (NodeID)this->nodes.size(); }
 

	
 
	/**
 
	 * Get date of last compression.
src/linkgraph/linkgraphjob.h
Show inline comments
 
@@ -332,7 +332,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.
0 comments (0 inline, 0 general)