Commit 4b6b2cbf authored by Tristan Matthews's avatar Tristan Matthews

* #29736: presence: pass strings as references

parent 23942f87
......@@ -327,10 +327,10 @@ std::string PresSubClient::getLineStatus()
return std::string(status_.info[0].rpid.note.ptr, status_.info[0].rpid.note.slen);
}
bool PresSubClient::isTermReason(std::string reason)
bool PresSubClient::isTermReason(const std::string &reason)
{
std::string myReason(term_reason_.ptr, term_reason_.slen);
return !myReason.compare(reason);
const std::string myReason(term_reason_.ptr, term_reason_.slen);
return not myReason.compare(reason);
}
void PresSubClient::rescheduleTimer(bool reschedule, unsigned msec)
......
......@@ -155,7 +155,7 @@ class PresSubClient {
/*
* Compare the reason of a transaction end with the given string.
*/
bool isTermReason(std::string);
bool isTermReason(const std::string &);
/**
* return the code after a transaction is terminated.
*/
......
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