From 6fe4d4ad7b055393ed04d11c58bc330c539aa31e Mon Sep 17 00:00:00 2001 From: rubidium42 Date: Wed, 26 May 2021 21:32:43 +0200 Subject: Codechange: linkgraph always iterates with NodeIDs over the Size(), so make Size() the same type to prevent infinite loops --- src/linkgraph/linkgraph.h | 2 +- src/linkgraph/linkgraphjob.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/linkgraph/linkgraph.h b/src/linkgraph/linkgraph.h index 4f44db827..32f94a3c8 100644 --- a/src/linkgraph/linkgraph.h +++ b/src/linkgraph/linkgraph.h @@ -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. diff --git a/src/linkgraph/linkgraphjob.h b/src/linkgraph/linkgraphjob.h index 4913b5a35..f434fa809 100644 --- a/src/linkgraph/linkgraphjob.h +++ b/src/linkgraph/linkgraphjob.h @@ -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. -- cgit v1.2.3-54-g00ecf