Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/aws-cpp-sdk-core/source/client/ClientConfiguration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,9 @@ Aws::Vector<Aws::String> calculateAuthPreferences() {
Aws::Vector<Aws::String> res;
auto prefs = Aws::Environment::GetEnv("AWS_AUTH_SCHEME_PREFERENCE");
Aws::Vector<Aws::String> prefsList = Aws::Utils::StringUtils::Split(prefs, ',');
res.reserve(prefsList.size()); // avoid repeated allocations
for (auto& pref : prefsList) {
res.push_back(Aws::Utils::StringUtils::Trim(pref.c_str()));
res.emplace_back(Aws::Utils::StringUtils::Trim(pref.c_str()));
}
return res;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ namespace Aws
for (auto& deviceInfo : driver->EnumerateDevices())
{
AWS_LOGSTREAM_DEBUG(CLASS_TAG, "Adding device " << deviceInfo.deviceName << " for driver " << driver->GetName());
OutputDevicePair device(deviceInfo, driver);
deviceDriverList.push_back(device);
deviceDriverList.emplace_back(deviceInfo, driver);
}
}

Expand All @@ -120,9 +119,11 @@ namespace Aws
auto voicesOutcome = m_pollyClient->DescribeVoices(describeVoices);
if (voicesOutcome.IsSuccess())
{
for (auto& voice : voicesOutcome.GetResult().GetVoices())
auto& voices = voicesOutcome.GetResult().GetVoices();
m_voices.reserve(voices.size());
for (const auto& voice : voices)
{
m_voices.push_back(std::pair<Aws::String, Aws::String>(voice.GetName(), voice.GetLanguageName()));
m_voices.emplace_back(voice.GetName(), voice.GetLanguageName());
}
}
else
Expand Down