StringUtil: Make SplitString return by value

Simpler usage.
This commit is contained in:
Léo Lam 2017-06-11 16:33:10 +02:00
commit 17ef4c8046
11 changed files with 19 additions and 34 deletions

View file

@ -686,10 +686,8 @@ void SConfig::LoadUSBPassthroughSettings(IniFile& ini)
IniFile::Section* section = ini.GetOrCreateSection("USBPassthrough");
m_usb_passthrough_devices.clear();
std::string devices_string;
std::vector<std::string> pairs;
section->Get("Devices", &devices_string, "");
SplitString(devices_string, ',', pairs);
for (const auto& pair : pairs)
for (const auto& pair : SplitString(devices_string, ','))
{
const auto index = pair.find(':');
if (index == std::string::npos)