mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 13:36:48 +08:00
incidental simplification
This commit is contained in:
@@ -43,12 +43,10 @@ namespace BlackMisc
|
||||
*/
|
||||
int CAudioDeviceList::count(CAudioDevice::DeviceType type) const
|
||||
{
|
||||
int c = 0;
|
||||
foreach(CAudioDevice device, *this)
|
||||
return std::count_if(this->begin(), this->end(), [type](const CAudioDevice &device)
|
||||
{
|
||||
if (device.getType() == type) c++;
|
||||
}
|
||||
return c;
|
||||
return device.getType() == type;
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user