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