diff options
author | ConfuSomu | 2024-03-20 13:28:19 -0400 |
---|---|---|
committer | ConfuSomu | 2024-03-20 13:28:19 -0400 |
commit | 4e59eadba3b0d4586a9122e6a825ea030a139c9a (patch) | |
tree | 6674c2b23ef6295e7a8d60bb034c3321e7a5a996 /src/net/instance.cpp | |
parent | 0e32ef940e53c4f10d84762f2de6836025f87610 (diff) | |
download | ActorViewer-4e59eadba3b0d4586a9122e6a825ea030a139c9a.tar ActorViewer-4e59eadba3b0d4586a9122e6a825ea030a139c9a.tar.gz ActorViewer-4e59eadba3b0d4586a9122e6a825ea030a139c9a.zip |
Use smart pointers with AP classes and Instance
Diffstat (limited to 'src/net/instance.cpp')
-rw-r--r-- | src/net/instance.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net/instance.cpp b/src/net/instance.cpp index 6982f64..8b2ad2d 100644 --- a/src/net/instance.cpp +++ b/src/net/instance.cpp @@ -4,15 +4,15 @@ #endif #include "src/settings_interface.h" -Instance* Instance::create_instance() { +InstancePtr Instance::create_instance() { return create_instance(SettingsInterface::quick_read_setting<AppSettingsTypes::InstanceType>("net/instance/type")); } -Instance* Instance::create_instance(AppSettingsTypes::InstanceType type) { +InstancePtr Instance::create_instance(AppSettingsTypes::InstanceType type) { switch (type) { #ifdef MASTODONPP_BUILD case AppSettingsTypes::InstanceType::MASTODON: - return new MastodonInstance; + return std::make_shared<MastodonInstance>(); #endif default: return nullptr; |