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

Method CheckIntegrity

src/roadstop.cpp:358–369  ·  view source on GitHub ↗

* Check the integrity of the data in this struct. * @param rs the roadstop this entry is part of */

Source from the content-addressed store, hash-verified

356 * @param rs the roadstop this entry is part of
357 */
358void RoadStop::Entry::CheckIntegrity(const RoadStop *rs) const
359{
360 if (!rs->status.Test(RoadStopStatusFlag::BaseEntry)) return;
361
362 /* The tile 'before' the road stop must not be part of this 'line' */
363 assert(IsDriveThroughStopTile(rs->xy));
364 assert(!IsDriveThroughRoadStopContinuation(rs->xy, rs->xy - TileOffsByAxis(GetDriveThroughStopAxis(rs->xy))));
365
366 Entry temp;
367 temp.Rebuild(rs, &rs->entries->east == this);
368 if (temp.length != this->length || temp.occupied != this->occupied) NOT_REACHED();
369}

Callers 1

CheckCachesFunction · 0.80

Calls 6

IsDriveThroughStopTileFunction · 0.85
TileOffsByAxisFunction · 0.85
GetDriveThroughStopAxisFunction · 0.85
NOT_REACHEDFunction · 0.85
TestMethod · 0.80
RebuildMethod · 0.45

Tested by

no test coverage detected