Adjust the setter the PluginContainer to use const values

This commit is contained in:
Maschell 2020-06-03 18:30:05 +02:00
parent 592ecf8eed
commit 1917ff9fb4
2 changed files with 4 additions and 4 deletions

View File

@ -188,7 +188,7 @@ std::vector<PluginContainer> PluginManagement::loadPlugins(const std::vector<Plu
if (metaInfo) { if (metaInfo) {
PluginContainer container; PluginContainer container;
container.setMetaInformation(metaInfo.value()); container.setMetaInformation(metaInfo.value());
container.setPluginData(const_cast<PluginData &>(pluginData)); container.setPluginData(pluginData);
plugins.push_back(container); plugins.push_back(container);
} else { } else {
DEBUG_FUNCTION_LINE("Failed to get meta information"); DEBUG_FUNCTION_LINE("Failed to get meta information");

View File

@ -37,7 +37,7 @@ public:
return this->metaInformation; return this->metaInformation;
} }
void setMetaInformation(PluginMetaInformation &metaInfo) { void setMetaInformation(const PluginMetaInformation &metaInfo) {
this->metaInformation = metaInfo; this->metaInformation = metaInfo;
} }
@ -45,7 +45,7 @@ public:
return pluginInformation; return pluginInformation;
} }
void setPluginInformation(PluginInformation &pluginInformation) { void setPluginInformation(const PluginInformation &pluginInformation) {
this->pluginInformation = pluginInformation; this->pluginInformation = pluginInformation;
} }
@ -53,7 +53,7 @@ public:
return pluginData; return pluginData;
} }
void setPluginData(PluginData &pluginData) { void setPluginData(const PluginData &pluginData) {
this->pluginData = pluginData; this->pluginData = pluginData;
} }