mirror of
https://github.com/wiiu-env/libwupsbackend.git
synced 2024-11-22 09:49:18 +01:00
Minor fixes and formatting
This commit is contained in:
parent
44761b322b
commit
4d1bfe3239
@ -62,7 +62,6 @@ std::optional<PluginMetaInformation> PluginUtils::getMetaInformationForPath(cons
|
|||||||
return metaInfo;
|
return metaInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::optional<PluginContainer> PluginUtils::getPluginForPath(const std::string &path) {
|
std::optional<PluginContainer> PluginUtils::getPluginForPath(const std::string &path) {
|
||||||
auto metaInfoOpt = PluginUtils::getMetaInformationForPath(path);
|
auto metaInfoOpt = PluginUtils::getMetaInformationForPath(path);
|
||||||
if (!metaInfoOpt) {
|
if (!metaInfoOpt) {
|
||||||
@ -118,7 +117,7 @@ std::vector<PluginContainer> PluginUtils::getLoadedPlugins(uint32_t maxSize) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (WUPSGetPluginDataForContainerHandles(handles, dataHandles, realSize) != 0) {
|
if (WUPSGetPluginDataForContainerHandles(handles, dataHandles, realSize) != ERROR_NONE) {
|
||||||
free(handles);
|
free(handles);
|
||||||
free(dataHandles);
|
free(dataHandles);
|
||||||
// DEBUG_FUNCTION_LINE("Failed to get plugin data");
|
// DEBUG_FUNCTION_LINE("Failed to get plugin data");
|
||||||
@ -126,7 +125,7 @@ std::vector<PluginContainer> PluginUtils::getLoadedPlugins(uint32_t maxSize) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
plugin_information* information = (plugin_information *) malloc(realSize * sizeof(plugin_information));
|
plugin_information* information = (plugin_information *) malloc(realSize * sizeof(plugin_information));
|
||||||
if(information == NULL){
|
if(!information){
|
||||||
free(handles);
|
free(handles);
|
||||||
free(dataHandles);
|
free(dataHandles);
|
||||||
return result;
|
return result;
|
||||||
@ -148,7 +147,7 @@ std::vector<PluginContainer> PluginUtils::getLoadedPlugins(uint32_t maxSize) {
|
|||||||
information[i].description,
|
information[i].description,
|
||||||
information[i].size);
|
information[i].size);
|
||||||
PluginData pluginData((uint32_t) dataHandles[i]);
|
PluginData pluginData((uint32_t) dataHandles[i]);
|
||||||
result.push_back(PluginContainer(pluginData, metaInfo, handles[i]));
|
result.emplace_back(pluginData, metaInfo, handles[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
free(handles);
|
free(handles);
|
||||||
|
Loading…
Reference in New Issue
Block a user