MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / internalFindObjectInIndex

Function internalFindObjectInIndex

src/OpenLoco/src/Objects/ObjectIndex.cpp:594–602  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

592 }
593
594 static std::optional<ObjIndexPair> internalFindObjectInIndex(const ObjectHeader& objectHeader)
595 {
596 auto res = std::ranges::find(_installedObjectList, objectHeader, &ObjectIndexEntry::_header);
597 if (res == std::end(_installedObjectList))
598 {
599 return std::nullopt;
600 }
601 return ObjIndexPair{ static_cast<ObjectIndexId>(std::distance(std::begin(_installedObjectList), res)), *res };
602 }
603
604 std::optional<ObjectIndexEntry> findObjectInIndex(const ObjectHeader& objectHeader)
605 {

Callers 3

findObjectInIndexFunction · 0.85

Calls 3

findFunction · 0.85
endFunction · 0.85
beginFunction · 0.85

Tested by

no test coverage detected