change up client rawRequest()

.rawRequest(Value()) is a no-op.
A truly empty request structure makes no sense.
This commit is contained in:
Michael Davidsaver
2021-09-13 17:53:27 -07:00
parent e474d5cde8
commit bbfa429c72
2 changed files with 5 additions and 9 deletions
+5 -5
View File
@@ -290,15 +290,15 @@ void CommonBase::_parse(const std::string& req)
Value CommonBase::_buildReq() const
{
if(!req) {
if(req && req->pvRequest) {
return req->pvRequest;
} else if(!req) {
using namespace pvxs::members;
return TypeDef(TypeCode::Struct, {
Struct("field", {}),
}).create();
} else if(req->pvRequest) {
return req->pvRequest;
} else {
using namespace pvxs::members;
@@ -306,7 +306,7 @@ Value CommonBase::_buildReq() const
req->fields,
});
{
if(!req->options.empty()) {
std::vector<Member> opts;
for(auto& pair : req->options) {
opts.push_back(TypeDef(pair.second).as(pair.first));
-4
View File
@@ -230,10 +230,6 @@ void testParseValue()
" struct {\n"
" } value\n"
" } field\n"
" struct {\n"
" struct {\n"
" } _options\n"
" } record\n"
"}\n"
);
}