MCPcopy Create free account
hub / github.com/Duet3D/RepRapFirmware / GetNumberOfContiguousTools

Method GetNumberOfContiguousTools

src/Tools/Tool.cpp:318–327  ·  view source on GitHub ↗

static*/

Source from the content-addressed store, hash-verified

316}
317
318/*static*/ unsigned int Tool::GetNumberOfContiguousTools() noexcept
319{
320 unsigned int numTools = 0;
321 ReadLocker lock(Tool::toolListLock);
322 for (const Tool *_ecv_null t = Tool::GetToolList(); t != nullptr && t->Number() == (int)numTools; t = t->Next())
323 {
324 ++numTools;
325 }
326 return numTools;
327}
328
329// Return the tool with the specified number, or null if it was not found
330/*static*/ ReadLockedPointer<Tool> Tool::GetLockedTool(int toolNumber) noexcept

Callers

nothing calls this directly

Calls 3

GetToolListFunction · 0.85
NumberMethod · 0.80
NextMethod · 0.45

Tested by

no test coverage detected