diff options
author | rubidium42 <rubidium@openttd.org> | 2021-05-30 12:32:59 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-06-10 20:09:44 +0200 |
commit | 6bb3f034e4788b67c7c3b4c8cf4a5de44c8644d0 (patch) | |
tree | ee49f4f61c98dae72ef51e670dfb9a6175cdf23d /src/network/core | |
parent | 37ae6b8ae3762ddccdeb96a178b2634791e2bbe0 (diff) | |
download | openttd-6bb3f034e4788b67c7c3b4c8cf4a5de44c8644d0.tar.xz |
Cleanup: [ContentInfo] Remove unused function
Diffstat (limited to 'src/network/core')
-rw-r--r-- | src/network/core/tcp_content.cpp | 16 | ||||
-rw-r--r-- | src/network/core/tcp_content_type.h | 1 |
2 files changed, 0 insertions, 17 deletions
diff --git a/src/network/core/tcp_content.cpp b/src/network/core/tcp_content.cpp index a53a352c2..abeb3d925 100644 --- a/src/network/core/tcp_content.cpp +++ b/src/network/core/tcp_content.cpp @@ -49,22 +49,6 @@ void ContentInfo::TransferFrom(ContentInfo *other) } /** - * Get the size of the data as send over the network. - * @return the size. - */ -size_t ContentInfo::Size() const -{ - size_t len = 0; - for (uint i = 0; i < this->tag_count; i++) len += strlen(this->tags[i]) + 1; - - /* The size is never larger than the content info size plus the size of the - * tags and dependencies */ - return sizeof(*this) + - sizeof(this->dependency_count) + - sizeof(*this->dependencies) * this->dependency_count; -} - -/** * Is the state either selected or autoselected? * @return true iff that's the case */ diff --git a/src/network/core/tcp_content_type.h b/src/network/core/tcp_content_type.h index 4dc20f46b..739cf1379 100644 --- a/src/network/core/tcp_content_type.h +++ b/src/network/core/tcp_content_type.h @@ -79,7 +79,6 @@ struct ContentInfo { void TransferFrom(ContentInfo *other); - size_t Size() const; bool IsSelected() const; bool IsValid() const; const char *GetTextfile(TextfileType type) const; |