本文整理汇总了C++中OwnedArray::remove方法的典型用法代码示例。如果您正苦于以下问题:C++ OwnedArray::remove方法的具体用法?C++ OwnedArray::remove怎么用?C++ OwnedArray::remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OwnedArray
的用法示例。
在下文中一共展示了OwnedArray::remove方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: moveItems
void ProjectTreeViewBase::moveItems (OwnedArray <Project::Item>& selectedNodes,
Project::Item destNode, int insertIndex)
{
for (int i = selectedNodes.size(); --i >= 0;)
{
Project::Item* const n = selectedNodes.getUnchecked(i);
if (destNode == *n || destNode.state.isAChildOf (n->state)) // Check for recursion.
return;
if (! destNode.canContain (*n))
selectedNodes.remove (i);
}
// Don't include any nodes that are children of other selected nodes..
for (int i = selectedNodes.size(); --i >= 0;)
{
Project::Item* const n = selectedNodes.getUnchecked(i);
for (int j = selectedNodes.size(); --j >= 0;)
{
if (j != i && n->state.isAChildOf (selectedNodes.getUnchecked(j)->state))
{
selectedNodes.remove (i);
break;
}
}
}
// Remove and re-insert them one at a time..
for (int i = 0; i < selectedNodes.size(); ++i)
{
Project::Item* selectedNode = selectedNodes.getUnchecked(i);
if (selectedNode->state.getParent() == destNode.state
&& indexOfNode (destNode.state, selectedNode->state) < insertIndex)
--insertIndex;
selectedNode->removeItemFromProject();
destNode.addChild (*selectedNode, insertIndex++);
}
}
示例2: initJuceDevicesIfNeeded
static void initJuceDevicesIfNeeded()
{
static AudioDeviceManager sDeviceManager;
static bool needsInit = true;
if (! needsInit)
return;
needsInit = false;
new JuceCleanup();
sDeviceManager.createAudioDeviceTypes(gDeviceTypes);
// remove JACK from device list
for (int i=0, count=gDeviceTypes.size(); i < count; ++i)
{
if (gDeviceTypes[i]->getTypeName() == "JACK")
{
gDeviceTypes.remove(i, true);
break;
}
}
}
示例3: initJuceDevicesIfNeeded
static void initJuceDevicesIfNeeded()
{
static AudioDeviceManager sDeviceManager;
if (gDeviceTypes.size() != 0)
return;
sDeviceManager.createAudioDeviceTypes(gDeviceTypes);
CARLA_SAFE_ASSERT_RETURN(gDeviceTypes.size() != 0,);
new JuceCleanup();
// remove JACK from device list
for (int i=0, count=gDeviceTypes.size(); i < count; ++i)
{
if (gDeviceTypes[i]->getTypeName() == "JACK")
{
gDeviceTypes.remove(i, true);
break;
}
}
}