diff --git a/daemon/src/iax/iaxcall.cpp b/daemon/src/iax/iaxcall.cpp index 934ab02a9..3c7c725bd 100644 --- a/daemon/src/iax/iaxcall.cpp +++ b/daemon/src/iax/iaxcall.cpp @@ -74,8 +74,8 @@ int IAXCall::getSupportedFormat(const std::string &accountID) const if (account) { vector codecs(account->getActiveAudioCodecs()); - for (vector::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 codecs(account->getActiveAudioCodecs()); - for (vector::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)