Add an overload to the /= operator for FString that is compatible with FStringView/TStringBuilder/FString and removed the FString specific /= operator.

- To maintain backwards compatibility an overload for non TCHAR raw string types has also been added which will be converted to the correct format via a temp FString first.
  - Fixed cases of Fstring /= char* found in AndroidPlatformFile.cpp and PythonScriptPluginPreload.cpp
- Added unit tests for the /= operator when passing in TCHAR*, ANSICHAR*, FString, FStringView and TStringBuilder in various forms.
- Changed GetNumfor TStringBuilderBase to return int32 (which is what TStringBuilderBase::Len() returns anyway) rather than SIZE_T to prevent compiler warnings about casting types.

#rb Steve.Robb

[CL 15674959 by paul chipchase in ue5-main branch]
This commit is contained in:
paul chipchase
2021-03-11 04:03:02 -04:00
parent 5772b2b485
commit 2f83d98619
5 changed files with 120 additions and 13 deletions

View File

@@ -85,7 +85,7 @@ private:
const FString PythonDSOWildcard = FString::Printf(TEXT("python%d*.dll"), PY_MAJOR_VERSION);
#elif PLATFORM_LINUX
const FString PythonDSOWildcard = FString::Printf(TEXT("libpython%d*.so*"), PY_MAJOR_VERSION);
PythonDir /= "lib";
PythonDir /= TEXT("lib");
#endif
LoadSharedDSO(PythonDSOWildcard, PythonDir);
}