mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-24 22:58:13 +00:00
fix(Content): findHeader must be const (it is a getter)
This commit is contained in:
parent
16558276c0
commit
e61718f658
2 changed files with 6 additions and 6 deletions
|
|
@ -19,9 +19,9 @@
|
|||
|
||||
// TODO: Remove me later.
|
||||
#include "linphone/core.h"
|
||||
#include "linphone/utils/utils.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include "linphone/utils/algorithm.h"
|
||||
#include "linphone/utils/utils.h"
|
||||
|
||||
#include "content-p.h"
|
||||
#include "content-type.h"
|
||||
|
|
@ -186,7 +186,7 @@ void Content::addHeader (const string &headerName, const string &headerValue) {
|
|||
d->headers.push_back(make_pair(headerName, headerValue));
|
||||
}
|
||||
|
||||
const list<pair<string,string>> &Content::getHeaders () const {
|
||||
const list<pair<string, string>> &Content::getHeaders () const {
|
||||
L_D();
|
||||
return d->headers;
|
||||
}
|
||||
|
|
@ -198,9 +198,9 @@ void Content::removeHeader (const string &headerName) {
|
|||
d->headers.remove(*it);
|
||||
}
|
||||
|
||||
list<pair<string,string>>::const_iterator Content::findHeader (const string &headerName) {
|
||||
list<pair<string, string>>::const_iterator Content::findHeader (const string &headerName) const {
|
||||
L_D();
|
||||
return find_if(d->headers.cbegin(), d->headers.cend(), [&headerName](const pair<string,string> &pair) {
|
||||
return findIf(d->headers, [&headerName](const pair<string, string> &pair) {
|
||||
return pair.first == headerName;
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public:
|
|||
const std::list<std::pair<std::string, std::string>> &getHeaders () const;
|
||||
void addHeader (const std::string &headerName, const std::string &headerValue);
|
||||
void removeHeader (const std::string &headerName);
|
||||
std::list<std::pair<std::string, std::string>>::const_iterator findHeader (const std::string &headerName);
|
||||
std::list<std::pair<std::string, std::string>>::const_iterator findHeader (const std::string &headerName) const;
|
||||
|
||||
// TODO: Remove me later.
|
||||
virtual LinphoneContent *toLinphoneContent () const;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue