diff vamp-json/VampJson.h @ 275:292ec9b50280

Tidy
author Chris Cannam <cannam@all-day-breakfast.com>
date Wed, 17 Oct 2018 15:43:00 +0100
parents 82f86151bc4b
children 26027c3a99a0
line wrap: on
line diff
--- a/vamp-json/VampJson.h	Wed Oct 17 15:22:29 2018 +0100
+++ b/vamp-json/VampJson.h	Wed Oct 17 15:43:00 2018 +0100
@@ -982,7 +982,8 @@
         }
 
         LoadResponse resp;
-        resp.plugin = pmapper.handleToPlugin(j["handle"].int_value());
+        auto h = j["handle"].int_value();
+        resp.plugin = pmapper.handleToPlugin(h);
         resp.staticData = toPluginStaticData(j["staticData"], err);
         if (failed(err)) return {};
         resp.defaultConfiguration = toPluginConfiguration(j["defaultConfiguration"],
@@ -1015,7 +1016,8 @@
         }
 
         ConfigurationRequest cr;
-        cr.plugin = pmapper.handleToPlugin(j["handle"].int_value());
+        auto h = j["handle"].int_value();
+        cr.plugin = pmapper.handleToPlugin(h);
         cr.configuration = toPluginConfiguration(j["configuration"], err);
         if (failed(err)) return {};
         return cr;
@@ -1066,7 +1068,8 @@
             return {};
         }
         
-        cr.plugin = pmapper.handleToPlugin(j["handle"].int_value());
+        auto h = j["handle"].int_value();
+        cr.plugin = pmapper.handleToPlugin(h);
 
         for (const auto &o: j["outputList"].array_items()) {
             auto odpair = toOutputDescriptor(o, err);
@@ -1130,7 +1133,8 @@
         }
 
         ProcessRequest r;
-        r.plugin = pmapper.handleToPlugin(j["handle"].int_value());
+        auto h = j["handle"].int_value();
+        r.plugin = pmapper.handleToPlugin(h);
 
         r.timestamp = toRealTime(input["timestamp"], err);
         if (failed(err)) return {};
@@ -1545,8 +1549,8 @@
         checkRpcRequestType(j, "finish", err);
         if (failed(err)) return {};
         FinishRequest req;
-        req.plugin = pmapper.handleToPlugin
-            (j["params"]["handle"].int_value());
+        auto h = j["params"]["handle"].int_value();
+        req.plugin = pmapper.handleToPlugin(h);
         return req;
     }