1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-16 07:31:16 +02:00

bug 11 - Use const references when returning the map vector to ensure the device maps are not modified. I don't expect this to fix the bug behavior, but am committing because some testers see bad behavior that suggests the maps are modified between scans.

This commit is contained in:
mchinen
2011-03-20 22:20:41 +00:00
parent a3a3230347
commit c1cf9b4a76
5 changed files with 24 additions and 22 deletions

View File

@@ -44,13 +44,13 @@ void DeviceManager::Destroy()
}
std::vector<DeviceSourceMap> &DeviceManager::GetInputDeviceMaps()
const std::vector<DeviceSourceMap> &DeviceManager::GetInputDeviceMaps()
{
if (!m_inited)
Init();
return mInputDeviceSourceMaps;
}
std::vector<DeviceSourceMap> &DeviceManager::GetOutputDeviceMaps()
const std::vector<DeviceSourceMap> &DeviceManager::GetOutputDeviceMaps()
{
if (!m_inited)
Init();
@@ -58,7 +58,7 @@ std::vector<DeviceSourceMap> &DeviceManager::GetOutputDeviceMaps()
}
wxString MakeDeviceSourceString(DeviceSourceMap *map)
wxString MakeDeviceSourceString(const DeviceSourceMap *map)
{
wxString ret;
ret = map->deviceString;