mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-25 07:29:10 +00:00
Cleanup: remove MD5SumToString in lieu of FormatArrayAsHex
This commit is contained in:
@@ -197,7 +197,7 @@ std::string GenerateCompanyPasswordHash(const std::string &password, const std::
|
||||
checksum.Append(salted_password_string.data(), salted_password_string.size());
|
||||
checksum.Finish(digest);
|
||||
|
||||
return MD5SumToString(digest);
|
||||
return FormatArrayAsHex(digest);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -666,7 +666,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_CHECK_NEWGRFS(P
|
||||
const GRFConfig *f = FindGRFConfig(c.grfid, FGCM_EXACT, &c.md5sum);
|
||||
if (f == nullptr) {
|
||||
/* We do not know this GRF, bail out of initialization */
|
||||
Debug(grf, 0, "NewGRF {:08X} not found; checksum {}", BSWAP32(c.grfid), MD5SumToString(c.md5sum));
|
||||
Debug(grf, 0, "NewGRF {:08X} not found; checksum {}", BSWAP32(c.grfid), FormatArrayAsHex(c.md5sum));
|
||||
ret = NETWORK_RECV_STATUS_NEWGRF_MISMATCH;
|
||||
}
|
||||
}
|
||||
|
@@ -365,7 +365,7 @@ class NetworkContentListWindow : public Window, ContentCallback {
|
||||
if (!first) url.push_back(',');
|
||||
first = false;
|
||||
|
||||
fmt::format_to(std::back_inserter(url), "{:08X}:{}", ci->unique_id, MD5SumToString(ci->md5sum));
|
||||
fmt::format_to(std::back_inserter(url), "{:08X}:{}", ci->unique_id, FormatArrayAsHex(ci->md5sum));
|
||||
}
|
||||
} else {
|
||||
url += "do=searchtext&q=";
|
||||
|
@@ -268,7 +268,7 @@ static void SurveyGrfs(nlohmann::json &survey)
|
||||
auto grfid = fmt::format("{:08x}", BSWAP32(c->ident.grfid));
|
||||
auto &grf = survey[grfid];
|
||||
|
||||
grf["md5sum"] = MD5SumToString(c->ident.md5sum);
|
||||
grf["md5sum"] = FormatArrayAsHex(c->ident.md5sum);
|
||||
grf["status"] = c->status;
|
||||
|
||||
if ((c->palette & GRFP_GRF_MASK) == GRFP_GRF_UNSET) grf["palette"] = "unset";
|
||||
|
Reference in New Issue
Block a user