Mercurial > hg > piper-cpp
diff json/VampJson.h @ 57:7aec704705c7
Make the output ID mapper stuff safer by using shared_ptr
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Mon, 19 Sep 2016 14:43:32 +0100 |
parents | 815e94fedc1c |
children | 77833938f0f8 |
line wrap: on
line diff
--- a/json/VampJson.h Mon Sep 19 14:10:19 2016 +0100 +++ b/json/VampJson.h Mon Sep 19 14:43:32 2016 +0100 @@ -1011,7 +1011,7 @@ json11::Json::object po; po["pluginHandle"] = pmapper.pluginToHandle(resp.plugin); po["features"] = fromFeatureSet(resp.features, - pmapper.pluginToOutputIdMapper(resp.plugin), + *pmapper.pluginToOutputIdMapper(resp.plugin), serialisation); jo["content"] = po; return json11::Json(jo); @@ -1041,7 +1041,7 @@ json11::Json::object po; po["pluginHandle"] = pmapper.pluginToHandle(resp.plugin); po["features"] = fromFeatureSet(resp.features, - pmapper.pluginToOutputIdMapper(resp.plugin), + *pmapper.pluginToOutputIdMapper(resp.plugin), serialisation); jo["content"] = po; return json11::Json(jo); @@ -1184,7 +1184,7 @@ auto h = jc["pluginHandle"].int_value(); resp.plugin = pmapper.handleToPlugin(h); resp.features = toFeatureSet(jc["features"], - pmapper.handleToOutputIdMapper(h), + *pmapper.handleToOutputIdMapper(h), serialisation); } return resp; @@ -1211,7 +1211,7 @@ auto h = jc["pluginHandle"].int_value(); resp.plugin = pmapper.handleToPlugin(h); resp.features = toFeatureSet(jc["features"], - pmapper.handleToOutputIdMapper(h), + *pmapper.handleToOutputIdMapper(h), serialisation); } return resp;