Organize imports and format code

This commit is contained in:
Maschell
2020-05-28 20:51:31 +02:00
parent 80a0712519
commit 7a7a1f7a63
12 changed files with 23 additions and 35 deletions

View File

@@ -23,7 +23,7 @@
class PluginContainer {
public:
PluginContainer(const PluginContainer& other) {
PluginContainer(const PluginContainer &other) {
this->pluginData = other.pluginData;
this->pluginInformation = other.pluginInformation;
this->metaInformation = other.metaInformation;

View File

@@ -3,7 +3,7 @@
#include "PluginData.h"
bool PluginDataPersistence::save(plugin_data_t *pluginDataStruct, PluginData &plugin) {
if(pluginDataStruct == NULL){
if (pluginDataStruct == NULL) {
return false;
}
pluginDataStruct->buffer = (char *) plugin.buffer;

View File

@@ -1,13 +1,13 @@
#include "PluginInformation.h"
PluginInformation::PluginInformation(const PluginInformation& other) {
for (size_t i=0; i<other.hook_data_list.size(); i++){
PluginInformation::PluginInformation(const PluginInformation &other) {
for (size_t i = 0; i < other.hook_data_list.size(); i++) {
hook_data_list.push_back(other.hook_data_list[i]);
}
for (size_t i=0; i<other.function_data_list.size(); i++){
for (size_t i = 0; i < other.function_data_list.size(); i++) {
function_data_list.push_back(other.function_data_list[i]);
}
for (size_t i=0; i<other.relocation_data_list.size(); i++){
for (size_t i = 0; i < other.relocation_data_list.size(); i++) {
relocation_data_list.push_back(other.relocation_data_list[i]);
}
section_info_list = other.section_info_list;

View File

@@ -29,7 +29,7 @@
class PluginInformation {
public:
PluginInformation(const PluginInformation& other);
PluginInformation(const PluginInformation &other);
PluginInformation() {
}

View File

@@ -1,6 +1,6 @@
#include "PluginMetaInformation.h"
PluginMetaInformation::PluginMetaInformation(const PluginMetaInformation& other) {
PluginMetaInformation::PluginMetaInformation(const PluginMetaInformation &other) {
this->name = other.name;
this->author = other.author;
this->version = other.version;

View File

@@ -22,7 +22,7 @@
class PluginMetaInformation {
public:
PluginMetaInformation(const PluginMetaInformation& other);
PluginMetaInformation(const PluginMetaInformation &other);
const std::string getName() const {
return name;

View File

@@ -36,6 +36,7 @@ std::optional<PluginMetaInformation> PluginMetaInformationFactory::loadPlugin(co
}
return loadPlugin(readerOpt.value());
}
std::optional<PluginMetaInformation> PluginMetaInformationFactory::loadPlugin(const std::string filePath) {
auto reader = new elfio;
if (reader == NULL || !reader->load(filePath)) {