Clean up and formatting

This commit is contained in:
Maschell
2020-12-26 14:17:50 +01:00
parent 0467178650
commit e9bd4651ca
30 changed files with 283 additions and 325 deletions

View File

@@ -22,7 +22,7 @@
#include <malloc.h>
#include <coreinit/memexpheap.h>
#include "elfio/elfio.hpp"
#include "../elfio/elfio.hpp"
using namespace ELFIO;
@@ -33,28 +33,23 @@ enum eMemoryTypes {
class PluginData {
public:
~PluginData() {
}
~PluginData() = default;
void freeMemory();
PluginData(const PluginData &obj);
PluginData() {
}
PluginData() = default;
void *buffer = NULL;
MEMHeapHandle heapHandle;
void *buffer = nullptr;
MEMHeapHandle heapHandle{};
eMemoryTypes memoryType;
size_t length = 0;
private:
PluginData(std::vector<uint8_t> buffer);
PluginData(std::vector<uint8_t> input, MEMHeapHandle heapHandle, eMemoryTypes memoryType);
static std::optional<PluginData> createFromExistingData(const void *buffer, MEMHeapHandle heapHandle, eMemoryTypes memoryType, const size_t length);
explicit PluginData(const std::vector<uint8_t> &buffer);
PluginData(const std::vector<uint8_t>& input, MEMHeapHandle heapHandle, eMemoryTypes memoryType);
friend class PluginDataFactory;