* #28351: iaxcall: use range-based for loops

This commit is contained in:
Tristan Matthews
2013-08-13 16:52:22 -04:00
parent 2740f79a4e
commit 284d1ff0bc

View File

@ -74,8 +74,8 @@ int IAXCall::getSupportedFormat(const std::string &accountID) const
if (account) {
vector<int> codecs(account->getActiveAudioCodecs());
for (vector<int>::const_iterator i = codecs.begin(); i != codecs.end(); ++i)
format_mask |= codecToASTFormat(*i);
for (const auto &i : codecs)
format_mask |= codecToASTFormat(i);
} else
ERROR("No IAx account could be found");
@ -90,8 +90,8 @@ int IAXCall::getFirstMatchingFormat(int needles, const std::string &accountID) c
if (account != NULL) {
vector<int> codecs(account->getActiveAudioCodecs());
for (vector<int>::const_iterator i = codecs.begin(); i != codecs.end(); ++i) {
int format_mask = codecToASTFormat(*i);
for (const auto &i : codecs) {
int format_mask = codecToASTFormat(i);
// Return the first that matches
if (format_mask & needles)