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

Method IsHeapStringArrayType

src/ObjectModel/ObjectModel.cpp:381–398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379}
380
381bool ExpressionValue::IsHeapStringArrayType() const noexcept
382{
383 if (type != (uint32_t)TypeCode::HeapArray)
384 {
385 return false;
386 }
387
388 ReadLocker lock(Heap::heapLock); // must have a read lock on heapLock when calling GetNumElements or GetElement
389 const size_t numElems = ahVal.GetNumElements();
390 for (size_t i = 0; i < numElems; ++i)
391 {
392 if (ahVal.GetElementType(i) != TypeCode::HeapString)
393 {
394 return false;
395 }
396 }
397 return true;
398}
399
400#if SUPPORT_CAN_EXPANSION
401

Callers 1

THROWSFunction · 0.80

Calls 2

GetNumElementsMethod · 0.80
GetElementTypeMethod · 0.80

Tested by

no test coverage detected