MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetContent

Method GetContent

src/network/network_content.cpp:832–838  ·  view source on GitHub ↗

* Get the content info based on a ContentID * @param cid the ContentID to search for * @return the ContentInfo or nullptr if not found */

Source from the content-addressed store, hash-verified

830 * @return the ContentInfo or nullptr if not found
831 */
832ContentInfo *ClientNetworkContentSocketHandler::GetContent(ContentID cid) const
833{
834 for (const auto &ci : this->infos) {
835 if (ci->id == cid) return ci.get();
836 }
837 return nullptr;
838}
839
840
841/**

Callers 4

SelectMethod · 0.95
UnselectMethod · 0.95
CheckDependencyStateMethod · 0.95
OnDownloadCompleteMethod · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected