From ae268ebde79c011df4722c6d3b76d4199eac7202 Mon Sep 17 00:00:00 2001 From: Mamadou Babaei Date: Tue, 21 Mar 2023 15:03:29 +0100 Subject: [PATCH] move the pimpl initialization to the constructor --- Source/SenseGloveSettings/Private/SGSettings/SGSettings.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/SenseGloveSettings/Private/SGSettings/SGSettings.cpp b/Source/SenseGloveSettings/Private/SGSettings/SGSettings.cpp index d04c006a..8fd96eb5 100644 --- a/Source/SenseGloveSettings/Private/SGSettings/SGSettings.cpp +++ b/Source/SenseGloveSettings/Private/SGSettings/SGSettings.cpp @@ -82,6 +82,7 @@ void USGSettings::FImplDeleter::operator()(const FImpl* P) const } USGSettings::USGSettings() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) { HardwareOffset = ESGPositionalTrackingHardware::None; HardwareLocationOffset = FVector::ZeroVector; @@ -99,8 +100,6 @@ void USGSettings::Initialize(FSubsystemCollectionBase& Collection) Super::Initialize(Collection); - Pimpl = TUniquePtr(new FImpl{this}, PimplDeleter); - SGLOG("Initializing the SenseGlove settings singleton with the engine lifetime..."); SGLOG("The SenseGlove settings singleton has been successfully initialized with the engine lifetime!");