MCPcopy Create free account
hub / github.com/DFHack/dfhack / CheckHashes

Function CheckHashes

plugins/remotefortressreader/remotefortressreader.cpp:620–632  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

618}
619
620static command_result CheckHashes(color_ostream &stream, const EmptyMessage *in)
621{
622 clock_t start = clock();
623 for (size_t i = 0; i < world->map.map_blocks.size(); i++)
624 {
625 df::map_block * block = world->map.map_blocks[i];
626 fletcher16((uint8_t*)(block->tiletype), 16 * 16 * sizeof(df::enums::tiletype::tiletype));
627 }
628 clock_t end = clock();
629 double elapsed_secs = double(end - start) / CLOCKS_PER_SEC;
630 stream.print("Checking all hashes took {} seconds.", elapsed_secs);
631 return CR_OK;
632}
633
634void CopyMat(RemoteFortressReader::MatPair * mat, int type, int index)
635{

Callers

nothing calls this directly

Calls 3

fletcher16Function · 0.85
sizeMethod · 0.45
printMethod · 0.45

Tested by

no test coverage detected