comparison vamp-capnp/VampnProto.h @ 275:292ec9b50280

Tidy
author Chris Cannam <cannam@all-day-breakfast.com>
date Wed, 17 Oct 2018 15:43:00 +0100
parents 02de5df3a884
children 26027c3a99a0
comparison
equal deleted inserted replaced
274:532a146b5229 275:292ec9b50280
641 static void 641 static void
642 readLoadResponse(LoadResponse &resp, 642 readLoadResponse(LoadResponse &resp,
643 const piper::LoadResponse::Reader &r, 643 const piper::LoadResponse::Reader &r,
644 const PluginHandleMapper &pmapper) { 644 const PluginHandleMapper &pmapper) {
645 645
646 resp.plugin = pmapper.handleToPlugin(r.getHandle()); 646 auto h = r.getHandle();
647 resp.plugin = pmapper.handleToPlugin(h);
647 readExtractorStaticData(resp.staticData, r.getStaticData()); 648 readExtractorStaticData(resp.staticData, r.getStaticData());
648 readConfiguration(resp.defaultConfiguration, 649 readConfiguration(resp.defaultConfiguration,
649 r.getDefaultConfiguration()); 650 r.getDefaultConfiguration());
650 } 651 }
651 652
698 static void 699 static void
699 readConfigurationResponse(ConfigurationResponse &cr, 700 readConfigurationResponse(ConfigurationResponse &cr,
700 const piper::ConfigurationResponse::Reader &r, 701 const piper::ConfigurationResponse::Reader &r,
701 const PluginHandleMapper &pmapper) { 702 const PluginHandleMapper &pmapper) {
702 703
703 cr.plugin = pmapper.handleToPlugin(r.getHandle()); 704 auto h = r.getHandle();
705 cr.plugin = pmapper.handleToPlugin(h);
704 cr.outputs.clear(); 706 cr.outputs.clear();
705 cr.staticOutputInfo.clear(); 707 cr.staticOutputInfo.clear();
706 auto oo = r.getOutputs(); 708 auto oo = r.getOutputs();
707 for (const auto &o: oo) { 709 for (const auto &o: oo) {
708 Vamp::Plugin::OutputDescriptor desc; 710 Vamp::Plugin::OutputDescriptor desc;
1083 const piper::RpcRequest::Reader &r, 1085 const piper::RpcRequest::Reader &r,
1084 const PluginHandleMapper &pmapper) { 1086 const PluginHandleMapper &pmapper) {
1085 if (getRequestResponseType(r) != RRType::Finish) { 1087 if (getRequestResponseType(r) != RRType::Finish) {
1086 throw std::logic_error("not a finish request"); 1088 throw std::logic_error("not a finish request");
1087 } 1089 }
1088 req.plugin = pmapper.handleToPlugin 1090 auto h = r.getRequest().getFinish().getHandle();
1089 (r.getRequest().getFinish().getHandle()); 1091 req.plugin = pmapper.handleToPlugin(h);
1090 } 1092 }
1091 1093
1092 static void 1094 static void
1093 readRpcResponse_Finish(FinishResponse &resp, 1095 readRpcResponse_Finish(FinishResponse &resp,
1094 const piper::RpcResponse::Reader &r, 1096 const piper::RpcResponse::Reader &r,