COMMON: Use forward to avoid extraneous copies

This is more a test than really useful as printf doesn't take objects
with move semantics
This commit is contained in:
Le Philousophe 2022-10-30 12:24:27 +01:00
parent f0cf08ec91
commit 032904f626

View File

@ -23,6 +23,7 @@
#define COMMON_USTR_H
#include "common/scummsys.h"
#include "common/util.h"
#include "common/str-enc.h"
#include "common/base-str.h"
@ -206,7 +207,7 @@ private:
template<class... TParam>
inline U32String U32String::format(const U32String &fmt, TParam... param) {
return formatInternal(&fmt, param...);
return formatInternal(&fmt, Common::forward<TParam>(param)...);
}
/** Concatenate strings @p x and @p y. */