Commit 6024a8fd authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Yet another fix for ChatMessage

parent 6bcf9311
......@@ -57,9 +57,9 @@ public:
SalCustomHeader *getSalCustomHeaders() const;
void setSalCustomHeaders(SalCustomHeader *headers);
void addSalCustomHeader(std::string name, std::string value);
void removeSalCustomHeader(std::string name);
std::string getSalCustomHeaderValue(std::string name);
void addSalCustomHeader(const std::string& name, const std::string& value);
void removeSalCustomHeader(const std::string& name);
std::string getSalCustomHeaderValue(const std::string& name);
// -----------------------------------------------------------------------------
// Methods only used for C wrapper
......
......@@ -119,16 +119,16 @@ void ChatMessagePrivate::setSalCustomHeaders(SalCustomHeader *headers) {
salCustomHeaders = headers;
}
void ChatMessagePrivate::addSalCustomHeader(string name, string value) {
void ChatMessagePrivate::addSalCustomHeader(const string& name, const string& value) {
salCustomHeaders = sal_custom_header_append(salCustomHeaders, name.c_str(), value.c_str());
}
void ChatMessagePrivate::removeSalCustomHeader(string name) {
void ChatMessagePrivate::removeSalCustomHeader(const string& name) {
salCustomHeaders = sal_custom_header_remove(salCustomHeaders, name.c_str());
}
string ChatMessagePrivate::getSalCustomHeaderValue(string name) {
return sal_custom_header_find(salCustomHeaders, name.c_str());
string ChatMessagePrivate::getSalCustomHeaderValue(const string& name) {
return L_C_TO_STRING(sal_custom_header_find(salCustomHeaders, name.c_str()));
}
// -----------------------------------------------------------------------------
......
Markdown is supported
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