Skip to content

Commit

Permalink
Use emplace_back instead of push_back
Browse files Browse the repository at this point in the history
  • Loading branch information
frabert committed Sep 14, 2018
1 parent d3a0348 commit dac612d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/audio/OpenALAudioEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const std::vector<std::string>& OpenALAudioEngine::devices()

while (device && *device != '\0' && next && *next != '\0')
{
enumeratedDevices.push_back(device);
enumeratedDevices.emplace_back(device);

len = strlen(device);
device += (len + 1);
Expand All @@ -71,7 +71,7 @@ const std::vector<std::string>& OpenALAudioEngine::devices()
}
else
{
enumeratedDevices.push_back("");
enumeratedDevices.emplace_back();
}
}

Expand Down

0 comments on commit dac612d

Please sign in to comment.