FString::Printf problem with fmt arg
In version 4.20 the FString::Printf generates a warning
warning C4996: 'FString::Printf': The formatting string must now be a TCHAR string literal. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
but If I write
No more warning.
In C++ the first and the second implementation are producing the same result. In 4.19.2 it works. But since Printf changed in 4.20, and it produces a warning and should not work in future release.
What I do not understand, why with a ternary operator it does generates a warning, since the result should be the same.
I have not tried that code, but I see a potential problem in your first implementation with the ternary operator. If that evaluates to true the first TEXT macro is not going to receive the arguments and I believe that is what you are seeing. Hope that helps
answered Aug 05 '18 at 01:18 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here