MCPcopy Create free account
hub / github.com/OpenZWave/open-zwave / GetItemIdxByLabel

Method GetItemIdxByLabel

cpp/src/value_classes/ValueList.cpp:329–343  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Get the index of an item from its label -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

327// Get the index of an item from its label
328//-----------------------------------------------------------------------------
329int32 ValueList::GetItemIdxByLabel
330(
331 string const& _label
332) const
333{
334 for( int32 i=0; i<(int32)m_items.size(); ++i )
335 {
336 if( _label == m_items[i].m_label )
337 {
338 return i;
339 }
340 }
341
342 return -1;
343}
344
345//-----------------------------------------------------------------------------
346// <ValueList::GetItemIdxByValue>

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected