Skip to content
Snippets Groups Projects
Commit 631c9165 authored by Jonathan Ehret's avatar Jonathan Ehret
Browse files

Merge branch 'feature/fix_LogF_warning' into 'develop'

Fixing the LogF warning

See merge request VR-Group/unreal-development/universallogging!3
parents 969a166b 1147a555
No related branches found
No related tags found
2 merge requests!16Develop,!3Fixing the LogF warning
...@@ -71,10 +71,12 @@ public: ...@@ -71,10 +71,12 @@ public:
* Advanced logging with printf like syntax. * Advanced logging with printf like syntax.
* Note: Does not automatically add newline! * Note: Does not automatically add newline!
*/ */
template<typename... TArgs> template<typename FmtType, typename... TArgs>
void LogF(const FString Stream, const FString Format, TArgs&&... Args) void LogF(const FString Stream, const FmtType& Format, TArgs&&... Args)
{ {
const FString Out = FString::Printf(*Format, Args...); static_assert(TIsArrayOrRefOfType<FmtType, TCHAR>::Value, "Format must be a TCHAR string literal, i.e., only ever call this function with TEXT(\"...\") as the second parameter.");
const FString Out = FString::Printf(Format, Args...);
Log(Out, Stream, true); Log(Out, Stream, true);
} }
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment