Commit 284d1ff0 authored by Tristan Matthews's avatar Tristan Matthews
Browse files

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

parent 2740f79a
...@@ -74,8 +74,8 @@ int IAXCall::getSupportedFormat(const std::string &accountID) const ...@@ -74,8 +74,8 @@ int IAXCall::getSupportedFormat(const std::string &accountID) const
if (account) { if (account) {
vector<int> codecs(account->getActiveAudioCodecs()); vector<int> codecs(account->getActiveAudioCodecs());
for (vector<int>::const_iterator i = codecs.begin(); i != codecs.end(); ++i) for (const auto &i : codecs)
format_mask |= codecToASTFormat(*i); format_mask |= codecToASTFormat(i);
} else } else
ERROR("No IAx account could be found"); ERROR("No IAx account could be found");
...@@ -90,8 +90,8 @@ int IAXCall::getFirstMatchingFormat(int needles, const std::string &accountID) c ...@@ -90,8 +90,8 @@ int IAXCall::getFirstMatchingFormat(int needles, const std::string &accountID) c
if (account != NULL) { if (account != NULL) {
vector<int> codecs(account->getActiveAudioCodecs()); vector<int> codecs(account->getActiveAudioCodecs());
for (vector<int>::const_iterator i = codecs.begin(); i != codecs.end(); ++i) { for (const auto &i : codecs) {
int format_mask = codecToASTFormat(*i); int format_mask = codecToASTFormat(i);
// Return the first that matches // Return the first that matches
if (format_mask & needles) if (format_mask & needles)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment