mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2026-08-23 19:34:01 -05:00
Rewrite the plugin backend, use smart pointers is possible, don't persist in structs and simplify code
This commit is contained in:
@@ -22,18 +22,11 @@
|
||||
class SectionInfo {
|
||||
|
||||
public:
|
||||
SectionInfo(std::string &name, uint32_t address, uint32_t sectionSize) : name(name),
|
||||
address(address),
|
||||
sectionSize(sectionSize) {
|
||||
SectionInfo(std::string name, uint32_t address, uint32_t sectionSize) : name(std::move(name)),
|
||||
address(address),
|
||||
sectionSize(sectionSize) {
|
||||
}
|
||||
|
||||
SectionInfo() = default;
|
||||
|
||||
SectionInfo(const SectionInfo &o2) = default;
|
||||
|
||||
|
||||
virtual ~SectionInfo() = default;
|
||||
|
||||
[[nodiscard]] const std::string &getName() const {
|
||||
return name;
|
||||
}
|
||||
@@ -46,6 +39,10 @@ public:
|
||||
return sectionSize;
|
||||
}
|
||||
|
||||
[[nodiscard]] uint32_t isInSection(uint32_t addr) const {
|
||||
return addr >= address && addr < address + sectionSize;
|
||||
}
|
||||
|
||||
private:
|
||||
std::string name;
|
||||
uint32_t address{};
|
||||
|
||||
Reference in New Issue
Block a user