[*] Use std::forward args
This commit is contained in:
parent
1cb56fb907
commit
ad182d07e0
@ -12,11 +12,11 @@
|
||||
#endif
|
||||
|
||||
template<typename T, typename... Args>
|
||||
static inline AuSPtr<T> AuMakeShared(Args... args)
|
||||
static inline AuSPtr<T> AuMakeShared(Args&&... args)
|
||||
{
|
||||
try
|
||||
{
|
||||
return AURORA_RUNTIME_MAKE_SHARED<T>(args...);
|
||||
return AURORA_RUNTIME_MAKE_SHARED<T>(std::forward<Args>(args)...);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
@ -29,9 +29,9 @@ static inline AuSPtr<T> AuMakeShared(Args... args)
|
||||
#endif
|
||||
|
||||
template<typename... Args>
|
||||
static inline auto AuMakePair(Args... args)
|
||||
static inline auto AuMakePair(Args&&... args)
|
||||
{
|
||||
return AURORA_RUNTIME_MAKE_PAIR(args...);
|
||||
return AURORA_RUNTIME_MAKE_PAIR(std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
#if defined(AURORA_IS_MODERNNT_DERIVED) && (defined(_WINDOWS_) || defined(_OTHER_MS_MAIN_HEADER_GUARDS_HERE))
|
||||
|
Loading…
Reference in New Issue
Block a user