Skip to content

Commit

Permalink
Remove #if ENGINE_MAJOR_VERSION and just use the old MakeShareable()
Browse files Browse the repository at this point in the history
  • Loading branch information
SRombautsU committed Jan 8, 2024
1 parent 88f2b84 commit 7fd8de3
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -704,11 +704,7 @@ static bool ParseHistoryResults(const bool bInUpdateHistory, const FXmlFile& InX
{
if (const FXmlNode* RevisionNode = RevisionNodes[Index])
{
#if ENGINE_MAJOR_VERSION == 4
const TSharedRef<FPlasticSourceControlRevision, ESPMode::ThreadSafe> SourceControlRevision = MakeShareable(new FPlasticSourceControlRevision);
#elif ENGINE_MAJOR_VERSION == 5
const TSharedRef<FPlasticSourceControlRevision, ESPMode::ThreadSafe> SourceControlRevision = MakeShared<FPlasticSourceControlRevision>();
#endif
SourceControlRevision->State = &InOutState;
SourceControlRevision->Filename = Filename;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,7 @@ TSharedRef<FPlasticSourceControlState, ESPMode::ThreadSafe> FPlasticSourceContro
else
{
// cache an unknown state for this item
#if ENGINE_MAJOR_VERSION == 4
TSharedRef<FPlasticSourceControlState, ESPMode::ThreadSafe> NewState = MakeShareable(new FPlasticSourceControlState(FString(InFilename)));
#elif ENGINE_MAJOR_VERSION == 5
TSharedRef<FPlasticSourceControlState, ESPMode::ThreadSafe> NewState = MakeShared<FPlasticSourceControlState>(FString(InFilename));
#endif
StateCache.Add(InFilename, NewState);
return NewState;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class FPlasticSourceControlProvider : public ISourceControlProvider
virtual TOptional<bool> IsAtLatestRevision() const; /* override NOTE: added in UE5.1 */
virtual TOptional<int> GetNumLocalChanges() const; /* override NOTE: added in UE5.1 */
virtual void Tick() override;
virtual TArray< TSharedRef<class ISourceControlLabel> > GetLabels(const FString& InMatchingSpec) const override;
virtual TArray<TSharedRef<class ISourceControlLabel>> GetLabels(const FString& InMatchingSpec) const override;
#if ENGINE_MAJOR_VERSION == 5
virtual TArray<FSourceControlChangelistRef> GetChangelists(EStateCacheUsage::Type InStateCacheUsage) override;
#endif
Expand Down

0 comments on commit 7fd8de3

Please sign in to comment.