Bug 1212745 - Part 1 - operator() Use perfect forwarding to avoid redundant copy. r=nfroyd

This commit is contained in:
James Cheng 2015-10-08 11:38:00 +02:00
parent 6ed090b633
commit 5e032ffed0

View File

@ -155,10 +155,11 @@ public:
return *this;
}
ReturnType operator()(Arguments... aArguments) const
template<typename... Args>
ReturnType operator()(Args&&... aArguments) const
{
MOZ_ASSERT(mImpl);
return mImpl->call(Forward<Arguments>(aArguments)...);
return mImpl->call(Forward<Args>(aArguments)...);
}
private:
// TODO: Consider implementing a small object optimization.