1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-20 04:59:11 +00:00

Codefix: First format argument of IConsolePrint not passed by reference

This commit is contained in:
Jonathan G Rennison
2024-09-28 21:34:49 +01:00
parent b4f96f54df
commit eac77c3098

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. */