Browse Source

Cleanup

Signed-off-by: falkTX <falktx@falktx.com>
pull/884/head
falkTX 1 month ago
parent
commit
d8966a9818
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 7 additions and 8 deletions
  1. +7
    -8
      plugins/plugins.cpp

+ 7
- 8
plugins/plugins.cpp View File

@@ -1069,18 +1069,17 @@ struct StaticPluginLoader {
return;
}

std::string version = "0.0.0";
json_t* versionJ = json_object_get(rootJ, "version");
if (versionJ)
std::string version;
if (json_t* const versionJ = json_object_get(rootJ, "version"))
version = json_string_value(versionJ);

if (!string::startsWith(version, APP_VERSION_MAJOR + "."))
{
// force ABI, we use static plugins so this doesnt matter as long as it builds
version = version.replace(0, 1, APP_VERSION_MAJOR).c_str();

json_t* json_version = json_string(version.c_str());
json_object_set(rootJ, "version", json_version);
json_decref(json_version);
json_t* json_version = json_string((APP_VERSION_MAJOR + ".0").c_str());
json_object_set(rootJ, "version", json_version);
json_decref(json_version);
}

// Load manifest
p->fromJson(rootJ);


Loading…
Cancel
Save