From 6a1b40d532cd173c9020d28ced833a1b395d79a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Rombauts?= Date: Wed, 10 Jan 2024 14:48:08 +0100 Subject: [PATCH 1/2] Wrap properly all strings of StateFromStatus() by the TEXT() macro The TEXT() macro is mandatory for proper Unicode support across all supported platforms --- .../Private/PlasticSourceControlParsers.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/PlasticSourceControl/Private/PlasticSourceControlParsers.cpp b/Source/PlasticSourceControl/Private/PlasticSourceControlParsers.cpp index 06a176a1..7fb01c6c 100644 --- a/Source/PlasticSourceControl/Private/PlasticSourceControlParsers.cpp +++ b/Source/PlasticSourceControl/Private/PlasticSourceControlParsers.cpp @@ -131,11 +131,11 @@ static EWorkspaceState StateFromStatus(const FString& InFileStatus, const bool b { EWorkspaceState State; - if (InFileStatus == "CH") // Modified but not Checked-Out + if (InFileStatus == TEXT("CH")) // Modified but not Checked-Out { State = EWorkspaceState::Changed; } - else if (InFileStatus == "CO") // Checked-Out with no change, or "don't know" if using on an old version of cm + else if (InFileStatus == TEXT("CO")) // Checked-Out with no change, or "don't know" if using on an old version of cm { // Recent version can distinguish between CheckedOut with or with no changes if (bInUsesCheckedOutChanged) @@ -147,7 +147,7 @@ static EWorkspaceState StateFromStatus(const FString& InFileStatus, const bool b State = EWorkspaceState::CheckedOutChanged; // Older version; need to assume it is changed to retain behavior } } - else if (InFileStatus == "CO+CH") // Checked-Out and changed from the new --iscochanged + else if (InFileStatus == TEXT("CO+CH")) // Checked-Out and changed from the new --iscochanged { State = EWorkspaceState::CheckedOutChanged; // Recent version; here it's checkedout with changes } @@ -163,23 +163,23 @@ static EWorkspaceState StateFromStatus(const FString& InFileStatus, const bool b { State = EWorkspaceState::Replaced; } - else if (InFileStatus == "AD") + else if (InFileStatus == TEXT("AD")) { State = EWorkspaceState::Added; } - else if ((InFileStatus == "PR") || (InFileStatus == "LM")) // Not Controlled/Not in Depot/Untracked (or Locally Moved/Renamed) + else if ((InFileStatus == TEXT("PR")) || (InFileStatus == TEXT("LM"))) // Not Controlled/Not in Depot/Untracked (or Locally Moved/Renamed) { State = EWorkspaceState::Private; } - else if (InFileStatus == "IG") + else if (InFileStatus == TEXT("IG")) { State = EWorkspaceState::Ignored; } - else if (InFileStatus == "DE") + else if (InFileStatus == TEXT("DE")) { State = EWorkspaceState::Deleted; // Deleted (removed from source control) } - else if (InFileStatus == "LD") + else if (InFileStatus == TEXT("LD")) { State = EWorkspaceState::LocallyDeleted; // Locally Deleted (ie. missing) } From eeb579835be08552ceb441b8887962ec24909a19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Rombauts?= Date: Wed, 10 Jan 2024 15:35:50 +0100 Subject: [PATCH 2/2] Fix Warning: Unknown file status 'AD+LD' --- .../Private/PlasticSourceControlParsers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/PlasticSourceControl/Private/PlasticSourceControlParsers.cpp b/Source/PlasticSourceControl/Private/PlasticSourceControlParsers.cpp index 7fb01c6c..97cf55c2 100644 --- a/Source/PlasticSourceControl/Private/PlasticSourceControlParsers.cpp +++ b/Source/PlasticSourceControl/Private/PlasticSourceControlParsers.cpp @@ -179,7 +179,7 @@ static EWorkspaceState StateFromStatus(const FString& InFileStatus, const bool b { State = EWorkspaceState::Deleted; // Deleted (removed from source control) } - else if (InFileStatus == TEXT("LD")) + else if (InFileStatus.Contains(TEXT("LD"))) // "LD", "AD+LD" { State = EWorkspaceState::LocallyDeleted; // Locally Deleted (ie. missing) }