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

Function logDivergentEntity

src/OpenLoco/src/GameSaveCompare.cpp:377–389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375
376 template<typename T1, typename T2>
377 bool logDivergentEntity(const T1& lhs, const T2& rhs, int arraySize, bool displayAllDivergences)
378 {
379 long divergentBytesTotal = 0;
380 for (int offset = 0; offset < arraySize; offset++)
381 {
382 divergentBytesTotal = logDivergentEntityOffset(lhs[offset], rhs[offset], offset, displayAllDivergences, divergentBytesTotal);
383 }
384 if (!displayAllDivergences && divergentBytesTotal > 1)
385 {
386 Logging::info(" {} other diverging bytes omitted", divergentBytesTotal);
387 }
388 return divergentBytesTotal > 0;
389 }
390
391 static bool compareGameStates(S5::GameState& gameState1, S5::GameState& gameState2, bool displayAllDivergences)
392 {

Callers 1

compareGameStatesFunction · 0.85

Calls 2

logDivergentEntityOffsetFunction · 0.85
infoFunction · 0.85

Tested by

no test coverage detected