From 8fd2f9df8fb307631738cfa87bf6b67b554c1ae8 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Sat, 25 Jul 2020 12:04:48 -0700 Subject: [PATCH] client Builder rawRequest() take const ref --- src/clientreq.cpp | 4 ++-- src/pvxs/client.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/clientreq.cpp b/src/clientreq.cpp index 376ac53..e1b9298 100644 --- a/src/clientreq.cpp +++ b/src/clientreq.cpp @@ -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->pvRequest = std::move(raw); + req->pvRequest = raw; } void CommonBase::_field(const std::string& s) { diff --git a/src/pvxs/client.h b/src/pvxs/client.h index a0fadf4..a66355b 100644 --- a/src/pvxs/client.h +++ b/src/pvxs/client.h @@ -403,7 +403,7 @@ protected: CommonBase(const std::shared_ptr& 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(); }