Make native module handles a special type

We love RAII
This commit is contained in:
PJB3005
2026-05-15 23:11:29 +02:00
parent 3f018204b6
commit 32069d936c
5 changed files with 134 additions and 69 deletions
+2 -1
View File
@@ -8,6 +8,7 @@
namespace dusk::modding {
class ModBundle;
class NativeModule;
}
namespace dusk {
@@ -35,7 +36,7 @@ struct LoadedMod {
std::string mod_path;
std::string dir;
void* handle = nullptr;
std::unique_ptr<modding::NativeModule> handle;
bool active = false;
bool load_failed = false;