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

Function computeChecksum

src/OpenLoco/src/Objects/ObjectManager.cpp:377–385  ·  view source on GitHub ↗

0x00472754

Source from the content-addressed store, hash-verified

375
376 // 0x00472754
377 static uint32_t computeChecksum(std::span<const std::byte> data, uint32_t seed)
378 {
379 auto checksum = seed;
380 for (auto d : data)
381 {
382 checksum = std::rotl(checksum ^ static_cast<uint8_t>(d), 11);
383 }
384 return checksum;
385 }
386
387 // 0x0047270B
388 static bool computeObjectChecksum(const ObjectHeader& object, std::span<const std::byte> data)

Callers 1

computeObjectChecksumFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected