Mercurial > hg > piper-cpp
changeset 203:d2a32436bf09
Fix some syntax that the compiler used with Emscripten on Travis doesn't
like
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Thu, 09 Feb 2017 09:21:37 +0000 |
parents | 458766b73e71 |
children | fbc61cf65c64 |
files | vamp-json/VampJson.h |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/vamp-json/VampJson.h Tue Feb 07 09:51:29 2017 +0000 +++ b/vamp-json/VampJson.h Thu Feb 09 09:21:37 2017 +0000 @@ -479,11 +479,11 @@ Vamp::Plugin::FeatureList fl; if (!j.is_array()) { err = "array expected for feature list"; - return {}; + return fl; } for (const json11::Json &fj : j.array_items()) { fl.push_back(toFeature(fj, serialisation, err)); - if (failed(err)) return {}; + if (failed(err)) return fl; } return fl; } @@ -497,16 +497,16 @@ Vamp::Plugin::FeatureSet fs; if (!j.is_object()) { err = "object expected for feature set"; - return {}; + return fs; } for (auto &entry : j.object_items()) { int n = omapper.idToIndex(entry.first); if (fs.find(n) != fs.end()) { err = "duplicate numerical index for output"; - return {}; + return fs; } fs[n] = toFeatureList(entry.second, serialisation, err); - if (failed(err)) return {}; + if (failed(err)) return fs; } return fs; }