Hopefully fixed the whole plugin mess I started

This commit is contained in:
WerWolv
2021-01-12 23:28:41 +01:00
parent 8ae15abb85
commit dc85616549
27 changed files with 137 additions and 173 deletions

View File

@@ -42,7 +42,7 @@ namespace hex {
this->m_mathEvaluator.setFunction("read", [this](auto args) -> std::optional<long double> {
u8 value = 0;
auto provider = *SharedData::get().currentProvider;
auto provider = SharedData::currentProvider;
if (provider == nullptr || !provider->isReadable() || args[0] >= provider->getActualSize())
return { };
@@ -52,7 +52,7 @@ namespace hex {
}, 1, 1);
this->m_mathEvaluator.setFunction("write", [this](auto args) -> std::optional<long double> {
auto provider = *SharedData::get().currentProvider;
auto provider = SharedData::currentProvider;
if (provider == nullptr || !provider->isWritable() || args[0] >= provider->getActualSize())
return { };