Codechange: [ContentInfo] Use a vector for dependencies instead of custom allocation

This commit is contained in:
rubidium42
2021-05-30 12:53:42 +02:00
committed by rubidium42
parent 9c424ab741
commit df181bb641
4 changed files with 16 additions and 21 deletions

View File

@@ -725,13 +725,11 @@ public:
SetDParam(0, this->selected->filesize);
y = DrawStringMultiLine(r.left + DETAIL_LEFT, r.right - DETAIL_RIGHT, y, max_y, STR_CONTENT_DETAIL_FILESIZE);
if (this->selected->dependency_count != 0) {
if (!this->selected->dependencies.empty()) {
/* List dependencies */
char buf[DRAW_STRING_BUFFER] = "";
char *p = buf;
for (uint i = 0; i < this->selected->dependency_count; i++) {
ContentID cid = this->selected->dependencies[i];
for (auto &cid : this->selected->dependencies) {
/* Try to find the dependency */
ConstContentIterator iter = _network_content_client.Begin();
for (; iter != _network_content_client.End(); iter++) {