Commit 2a20a692 authored by mercury233's avatar mercury233

use std::forward

parent e02a8249
......@@ -54,12 +54,12 @@
#include "../ocgcore/ocgapi.h"
template<size_t N, typename... TR>
inline int myswprintf(wchar_t(&buf)[N], const wchar_t* fmt, TR... args) {
return std::swprintf(buf, N, fmt, args...);
inline int myswprintf(wchar_t(&buf)[N], const wchar_t* fmt, TR&&... args) {
return std::swprintf(buf, N, fmt, std::forward<TR>(args)...);
}
template<size_t N, typename... TR>
inline int mysnprintf(char(&buf)[N], const char* fmt, TR... args) {
return std::snprintf(buf, N, fmt, args...);
inline int mysnprintf(char(&buf)[N], const char* fmt, TR&&... args) {
return std::snprintf(buf, N, fmt, std::forward<TR>(args)...);
}
inline FILE* mywfopen(const wchar_t* filename, const char* mode) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment