Skip to content

Commit d3262db

Browse files
committed
Remove creator function and replace with HAL include
1 parent ef36c23 commit d3262db

File tree

3 files changed

+3
-16
lines changed

3 files changed

+3
-16
lines changed

plugin-dev/Source/Sentry/Private/HAL/PlatformSentryUser.h

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,4 @@
22

33
#pragma once
44

5-
#if PLATFORM_ANDROID
6-
#include "Android/AndroidSentryUser.h"
7-
#elif PLATFORM_APPLE
8-
#include "Apple/AppleSentryUser.h"
9-
#elif USE_SENTRY_NATIVE
10-
#include "GenericPlatform/GenericPlatformSentryUser.h"
11-
#else
12-
#include "Null/NullSentryUser.h"
13-
#endif
14-
15-
static TSharedPtr<ISentryUser> CreateSharedSentryUser()
16-
{
17-
return MakeShareable(new FPlatformSentryUser);
18-
}
5+
#include COMPILED_PLATFORM_HEADER(SentryUser.h)

plugin-dev/Source/Sentry/Private/SentryLibrary.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ USentryEvent* USentryLibrary::CreateSentryEvent(const FString& Message, ESentryL
2929

3030
USentryUser* USentryLibrary::CreateSentryUser(const FString& Email, const FString& Id, const FString& Username, const FString& IpAddress, const TMap<FString, FString>& Data)
3131
{
32-
USentryUser* User = USentryUser::Create(CreateSharedSentryUser());
32+
USentryUser* User = USentryUser::Create(MakeShareable(new FPlatformSentryUser));
3333

3434
if (!Email.IsEmpty())
3535
User->SetEmail(Email);

plugin-dev/Source/Sentry/Private/SentryUser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
void USentryUser::Initialize()
88
{
9-
NativeImpl = CreateSharedSentryUser();
9+
NativeImpl = MakeShareable(new FPlatformSentryUser);
1010
}
1111

1212
void USentryUser::SetEmail(const FString& Email)

0 commit comments

Comments
 (0)