aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/instance.cpp
diff options
context:
space:
mode:
authorConfuSomu2024-03-20 13:28:19 -0400
committerConfuSomu2024-03-20 13:28:19 -0400
commit4e59eadba3b0d4586a9122e6a825ea030a139c9a (patch)
tree6674c2b23ef6295e7a8d60bb034c3321e7a5a996 /src/net/instance.cpp
parent0e32ef940e53c4f10d84762f2de6836025f87610 (diff)
downloadActorViewer-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.cpp6
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;