Codefix: First format argument of IConsolePrint not passed by reference (#12966)

This commit is contained in:
Jonathan G Rennison 2024-10-01 14:12:19 +01:00 committed by GitHub
parent 7a0e50002b
commit 386dbb7c80
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -38,7 +38,7 @@ void IConsolePrint(TextColour colour_code, const std::string &string);
* @tparam Args The types of the other arguments.
*/
template <typename A, typename ... Args>
inline void IConsolePrint(TextColour colour_code, fmt::format_string<A, Args...> format, A first_arg, Args&&... other_args)
inline void IConsolePrint(TextColour colour_code, fmt::format_string<A, Args...> format, A&& first_arg, Args&&... other_args)
{
/* The separate first_arg argument is added to aid overloading.
* Otherwise the calls that do no need formatting will still use this function. */