client Builder rawRequest() take const ref

This commit is contained in:
Michael Davidsaver
2020-07-25 12:04:48 -07:00
parent 64400c5050
commit 8fd2f9df8f
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -31,11 +31,11 @@ struct CommonBase::Req {
CommonBase::~CommonBase() {}
void CommonBase::_rawRequest(Value&& raw)
void CommonBase::_rawRequest(const Value& raw)
{
if(!req)
req = std::make_shared<Req>();
req->pvRequest = std::move(raw);
req->pvRequest = raw;
}
void CommonBase::_field(const std::string& s)
{
+2 -2
View File
@@ -403,7 +403,7 @@ protected:
CommonBase(const std::shared_ptr<Context::Pvt>& ctx, const std::string& name) : ctx(ctx), _name(name) {}
~CommonBase();
void _rawRequest(Value&&);
void _rawRequest(const Value&);
void _field(const std::string& s);
void _record(const std::string& key, const void* value, StoreType vtype);
void _parse(const std::string& req);
@@ -467,7 +467,7 @@ public:
SubBuilder& pvRequest(const std::string& expr) { this->_parse(expr); return _sb(); }
//! Store raw pvRequest blob.
SubBuilder& rawRequest(Value&& r) { this->_rawRequest(std::move(r)); return _sb(); }
SubBuilder& rawRequest(const Value& r) { this->_rawRequest(r); return _sb(); }
SubBuilder& priority(int p) { this->_prio = p; return _sb(); }
SubBuilder& server(const std::string& s) { this->_server = s; return _sb(); }